Skip to content

Commit 8a33c99

Browse files
authored
Replace placeholder site with Docusaurus (#3)
Includes draft docs for public launch
1 parent 9fa7ee4 commit 8a33c99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+19599
-5613
lines changed

.gitignore

+17-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
96

10-
node_modules
11-
dist
12-
dist-ssr
13-
*.local
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
1410

15-
# Editor directories and files
16-
.vscode/*
17-
!.vscode/extensions.json
18-
.idea
11+
# Misc
1912
.DS_Store
20-
*.suo
21-
*.ntvs*
22-
*.njsproj
23-
*.sln
24-
*.sw?
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

README.md

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
# Landing Page for CodeGate
1+
# CodeGate docs
22

3-
Landing page and documentation site for the CodeGate Project
3+
This repository contains the public-facing docs for CodeGate, hosted at
4+
[https://docs.codegate.ai](https://docs.codegate.ai).
45

5-
![Picture of website in Light mode](./images/light.png)
6+
## Local Development
67

7-
![Picture of website in Dark mode](./images/dark.png)
8+
```bash
9+
npm install
10+
npm run start
11+
```
812

9-
# React + Vite
13+
This command starts a local development server and opens up a browser window.
14+
Most changes are reflected live without having to restart the server.
1015

11-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
16+
## Build
1217

13-
Currently, two official plugins are available:
18+
```bash
19+
npm run build
20+
```
1421

15-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
16-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
22+
This command generates static content into the `build` directory.
23+
24+
## About
25+
26+
This site is built with [Docusaurus](https://docusaurus.io/), a modern static
27+
website generator.

docs/about/_category_.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
label: 'About CodeGate'
2+
position: 50
3+
collapsed: false

docs/about/contributing.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Contributing
3+
description: How to contribute to the project.
4+
sidebar_position: 30
5+
---
6+
7+
CodeGate is an open source (Apache-2.0) project maintained by
8+
[Stacklok](https://www.stacklok.com), and we welcome community contributions.
9+
10+
:::danger[Content needed]
11+
12+
This is all boilerplate lifted from elsewhere, pending final contributor
13+
guidelines
14+
15+
:::
16+
17+
## How to contribute
18+
19+
### Reporting issues
20+
21+
If you encounter a bug, create a new issue on our GitHub repository with a clear
22+
description, steps to reproduce, and any relevant screenshots or error logs.
23+
24+
Search existing issues to avoid duplicates.
25+
26+
### Suggesting features
27+
28+
If you have an idea for a new feature, create a new issue labeled "feature
29+
request" with a detailed explanation of the proposed functionality and its
30+
benefits.
31+
32+
### Development environment
33+
34+
Refer to the [Developer reference](../development/index.md) section for details
35+
about setting up your development environment, building the app, and running
36+
tests.
37+
38+
### Submitting changes
39+
40+
To contribute code, fork the
41+
[CodeGate repository](https://github.com/stacklok/codegate) on GitHub to your
42+
personal account.
43+
44+
Push your changes to your forked repository and open a pull request from your
45+
branch to the main branch of the original repository.
46+
47+
Provide a detailed description of your changes in the pull request, referencing
48+
any relevant issues or discussions. Include tests if applicable.
49+
50+
## Communication
51+
52+
### Community discussion
53+
54+
Join the `#codegate` channel on the
55+
[Stacklok Discord server](https://discord.gg/stacklok) to discuss project ideas,
56+
ask questions, and share resources.
57+
58+
### Code reviews
59+
60+
Be open to feedback from reviewers during the pull request process and make
61+
necessary adjustments.
62+
63+
### Respectful communication
64+
65+
Always maintain a respectful and constructive tone in your interactions with
66+
other contributors and maintainers.

docs/about/faq.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Frequently asked questions
3+
description: Frequently asked questions about the CodeGate project.
4+
sidebar_label: FAQ
5+
sidebar_position: 10
6+
---
7+
8+
:::danger[Content needed]
9+
10+
Please help seed some questions in the draft doc
11+
12+
:::
13+
14+
### Does CodeGate replace my AI code assistant plugin?
15+
16+
No, CodeGate works _with_ your AI code assistant, as a local gateway between
17+
your client and the LLM it's communicating with.
18+
19+
### Does CodeGate work with any plugins other than Copilot and Continue?
20+
21+
Currently, CodeGate works with GitHub Copilot and Continue. We are actively
22+
exploring additional integrations based on user feedback.

docs/about/index.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: About CodeGate
3+
description: More information about the CodeGate project.
4+
---
5+
6+
import DocCardList from '@theme/DocCardList';
7+
8+
Learn more about the CodeGate project.
9+
10+
<DocCardList />

docs/about/roadmap.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Roadmap
3+
description: What are we working on next?
4+
sidebar_position: 20
5+
---
6+
7+
:::danger[Content needed]
8+
9+
Needs content from Pathfinder team
10+
11+
:::

docs/development/_category_.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
label: 'Developer reference'
2+
position: 40

docs/development/cli.md

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
title: CLI commands and flags
3+
description: CodeGate provides a command-line interface
4+
sidebar_position: 10
5+
---
6+
7+
CodeGate provides a command-line interface through `cli.py` with the following
8+
structure:
9+
10+
## Main command
11+
12+
```bash
13+
codegate [OPTIONS] COMMAND [ARGS]...
14+
```
15+
16+
## Available commands
17+
18+
### `serve`
19+
20+
Start the CodeGate server:
21+
22+
```bash
23+
codegate serve [OPTIONS]
24+
```
25+
26+
#### Options {#server-options}
27+
28+
- `--port INTEGER`: Port to listen on (default: `8989`)
29+
- Must be between 1 and 65535
30+
- Overrides configuration file and environment variables
31+
- `--host TEXT`: Host to bind to (default: `localhost`)
32+
- Overrides configuration file and environment variables
33+
- `--log-level [ERROR|WARNING|INFO|DEBUG]`: Set the log level (default: `INFO`)
34+
- Case-insensitive
35+
- Overrides configuration file and environment variables
36+
- `--log-format [JSON|TEXT]`: Set the log format (default: `JSON`)
37+
- Case-insensitive
38+
- Overrides configuration file and environment variables
39+
- `--config FILE`: Path to YAML config file
40+
41+
- Optional
42+
- Must be a valid YAML file
43+
- Configuration values can be overridden by environment variables and CLI
44+
options
45+
46+
- `--prompts FILE`: Path to YAML prompts file
47+
48+
- Optional
49+
- Must be a valid YAML file
50+
- Overrides default prompts and configuration file prompts
51+
52+
- `--vllm-url TEXT`: vLLM provider URL (default: `http://localhost:8000`)
53+
54+
- Optional
55+
- Base URL for vLLM provider (/v1 path is added automatically)
56+
- Overrides configuration file and environment variables
57+
58+
- `--openai-url TEXT`: OpenAI provider URL (default:
59+
`https://api.openai.com/v1`)
60+
61+
- Optional
62+
- Base URL for OpenAI provider
63+
- Overrides configuration file and environment variables
64+
65+
- `--anthropic-url TEXT`: Anthropic provider URL (default:
66+
`https://api.anthropic.com/v1`)
67+
68+
- Optional
69+
- Base URL for Anthropic provider
70+
- Overrides configuration file and environment variables
71+
72+
- `--ollama-url TEXT`: Ollama provider URL (default: `http://localhost:11434`)
73+
- Optional
74+
- Base URL for Ollama provider (/api path is added automatically)
75+
- Overrides configuration file and environment variables
76+
77+
### `show-prompts`
78+
79+
Display the loaded system prompts:
80+
81+
```bash
82+
codegate show-prompts [OPTIONS]
83+
```
84+
85+
#### Options {#show-prompts-options}
86+
87+
- `--prompts FILE`: Path to YAML prompts file
88+
- Optional
89+
- Must be a valid YAML file
90+
- If not provided, shows default prompts from [prompts/default.yaml](https://github.com/stacklok/codegate/blob/main/prompts/default.yaml)
91+
92+
## Error handling
93+
94+
The CLI provides user-friendly error messages for:
95+
96+
- Invalid port numbers
97+
- Invalid log levels
98+
- Invalid log formats
99+
- Configuration file errors
100+
- Prompts file errors
101+
- Server startup failures
102+
103+
All errors are output to stderr with appropriate exit codes.
104+
105+
## Examples
106+
107+
Start server with default settings:
108+
109+
```bash
110+
codegate serve
111+
```
112+
113+
Start server on specific port and host:
114+
115+
```bash
116+
codegate serve --port 8989 --host localhost
117+
```
118+
119+
Start server with custom logging:
120+
121+
```bash
122+
codegate serve --log-level DEBUG --log-format TEXT
123+
```
124+
125+
Start server with configuration file:
126+
127+
```bash
128+
codegate serve --config my-config.yaml
129+
```
130+
131+
Start server with custom prompts:
132+
133+
```bash
134+
codegate serve --prompts my-prompts.yaml
135+
```
136+
137+
Start server with custom vLLM endpoint:
138+
139+
```bash
140+
codegate serve --vllm-url https://vllm.example.com
141+
```
142+
143+
Start server with custom Ollama endpoint:
144+
145+
```bash
146+
codegate serve --ollama-url http://localhost:11434
147+
```
148+
149+
Show default system prompts:
150+
151+
```bash
152+
codegate show-prompts
153+
```
154+
155+
Show prompts from a custom file:
156+
157+
```bash
158+
codegate show-prompts --prompts my-prompts.yaml
159+
```

0 commit comments

Comments
 (0)