freeai-code 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {freeai_code-0.1.2/freeai_code.egg-info → freeai_code-0.1.4}/PKG-INFO +43 -29
- {freeai_code-0.1.2 → freeai_code-0.1.4}/README.md +40 -26
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/__init__.py +1 -1
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/auth.py +3 -3
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/client.py +15 -2
- {freeai_code-0.1.2 → freeai_code-0.1.4/freeai_code.egg-info}/PKG-INFO +43 -29
- {freeai_code-0.1.2 → freeai_code-0.1.4}/pyproject.toml +3 -3
- {freeai_code-0.1.2 → freeai_code-0.1.4}/LICENSE +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/__main__.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/agent.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/cli.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/cloud.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/config.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/context/__init__.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/context/discovery.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/context/repo_map.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/context/window.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/models.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/streaming.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/tools/__init__.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/tools/file_ops.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/tools/git_ops.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/tools/list_files.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/tools/search.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/tools/shell.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/tools/test_runner.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/ui/__init__.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/ui/diff_view.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/ui/prompt.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/free_code/ui/terminal.py +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/freeai_code.egg-info/SOURCES.txt +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/freeai_code.egg-info/dependency_links.txt +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/freeai_code.egg-info/entry_points.txt +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/freeai_code.egg-info/requires.txt +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/freeai_code.egg-info/top_level.txt +0 -0
- {freeai_code-0.1.2 → freeai_code-0.1.4}/setup.cfg +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: freeai-code
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Free AI coding assistant — open-source Claude Code alternative. pip install freeai-code
|
|
5
5
|
Author-email: "Free.ai" <hello@free.ai>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://free.ai/coder/
|
|
8
8
|
Project-URL: Documentation, https://free.ai/api/
|
|
9
|
-
Project-URL: Repository, https://github.com/
|
|
10
|
-
Project-URL: Bug Tracker, https://github.com/
|
|
9
|
+
Project-URL: Repository, https://github.com/muddyholdings/free-code
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/muddyholdings/free-code/issues
|
|
11
11
|
Project-URL: Changelog, https://free.ai/changelog/
|
|
12
12
|
Keywords: ai,coding,assistant,cli,free,claude-code,cursor,copilot
|
|
13
13
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -39,17 +39,31 @@ Free AI coding assistant for your terminal. A free, open-source alternative to C
|
|
|
39
39
|
|
|
40
40
|
## Install
|
|
41
41
|
|
|
42
|
+
One line, nothing to set up first (no Python, no pip, no sudo). It uses [uv](https://docs.astral.sh/uv/) and installs it for you if missing.
|
|
43
|
+
|
|
42
44
|
```bash
|
|
43
|
-
#
|
|
44
|
-
curl -fsSL https://free.ai/install | sh
|
|
45
|
+
# macOS / Linux
|
|
46
|
+
curl -fsSL https://free.ai/install.sh | sh
|
|
47
|
+
```
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
```powershell
|
|
50
|
+
# Windows (PowerShell)
|
|
51
|
+
irm https://free.ai/install.ps1 | iex
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Re-run the same line to upgrade. Pin a version with `FREE_CODE_VERSION=0.1.4` (PowerShell: `$env:FREE_CODE_VERSION = "0.1.4"`). The scripts are in [`install/`](install/): they use uv, else pipx, else a private venv in `~/.free-code`, and put `free-code` in `~/.local/bin`.
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
Already have Python or Node?
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install freeai-code
|
|
50
60
|
npm install -g freeai-code
|
|
51
61
|
```
|
|
52
62
|
|
|
63
|
+
## First run
|
|
64
|
+
|
|
65
|
+
Run `free-code` in a project. The free anonymous tier works with no account. When the daily anonymous limit is used up, the CLI tells you to get a free key (no card) at https://free.ai/account/#api-keys and run `free-code login`.
|
|
66
|
+
|
|
53
67
|
## Quick Start
|
|
54
68
|
|
|
55
69
|
```bash
|
|
@@ -93,12 +107,12 @@ free-code init
|
|
|
93
107
|
- Streaming output with syntax highlighting
|
|
94
108
|
- Context window optimization and repo map generation
|
|
95
109
|
- .gitignore-aware file discovery
|
|
96
|
-
- Session sync
|
|
97
|
-
- Cloud tasks
|
|
110
|
+
- Session sync: continue conversations from [web](https://free.ai/coder/) to CLI and back
|
|
111
|
+
- Cloud tasks: run long coding tasks on Free.ai's GPUs and pick up the result later
|
|
98
112
|
|
|
99
113
|
## Cloud Tasks
|
|
100
114
|
|
|
101
|
-
Run a coding task on Free.ai's infrastructure instead of your machine
|
|
115
|
+
Run a coding task on Free.ai's infrastructure instead of your machine: like a codex agent from the terminal. Requires an API key: run `free-code login` and paste a key from [free.ai/developer](https://free.ai/developer/) (free tier works).
|
|
102
116
|
|
|
103
117
|
```bash
|
|
104
118
|
# Submit and watch (polls until done, prints the markdown report)
|
|
@@ -125,7 +139,7 @@ Config is stored at `~/.free-code/config.yaml`.
|
|
|
125
139
|
# Set your Free.ai token (get one at https://free.ai/account/)
|
|
126
140
|
free-code config set token sk-free-xxx
|
|
127
141
|
|
|
128
|
-
# Use your own API key (BYOK
|
|
142
|
+
# Use your own API key (BYOK: no markup, use your own provider)
|
|
129
143
|
free-code config set provider openai
|
|
130
144
|
free-code config set api_key sk-xxx
|
|
131
145
|
|
|
@@ -141,10 +155,10 @@ free-code config set safe_mode true
|
|
|
141
155
|
| Provider | Default Model | Free Tier |
|
|
142
156
|
|----------|--------------|-----------|
|
|
143
157
|
| **free.ai** (default) | Qwen 7B | 50K tokens/day |
|
|
144
|
-
| **openai** | GPT-4o | BYOK
|
|
145
|
-
| **anthropic** | Claude Sonnet 4 | BYOK
|
|
146
|
-
| **google** | Gemini 2.5 Pro | BYOK
|
|
147
|
-
| **openrouter** | 346+ models | BYOK
|
|
158
|
+
| **openai** | GPT-4o | BYOK: no markup |
|
|
159
|
+
| **anthropic** | Claude Sonnet 4 | BYOK: no markup |
|
|
160
|
+
| **google** | Gemini 2.5 Pro | BYOK: no markup |
|
|
161
|
+
| **openrouter** | 346+ models | BYOK: no markup |
|
|
148
162
|
|
|
149
163
|
## How It Works
|
|
150
164
|
|
|
@@ -161,13 +175,13 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
161
175
|
- **Anonymous**: 10K tokens/day (Qwen Coder only)
|
|
162
176
|
- **Free account**: 50K tokens/day (sign up at [free.ai](https://free.ai/signup/))
|
|
163
177
|
- **Paid plans**: From $5/month for 200K tokens ([pricing](https://free.ai/pricing/))
|
|
164
|
-
- **BYOK**: $0
|
|
178
|
+
- **BYOK**: $0: bring your own API key, no markup
|
|
165
179
|
|
|
166
180
|
## Links
|
|
167
181
|
|
|
168
|
-
- [Free.ai](https://free.ai)
|
|
169
|
-
- [Web IDE](https://free.ai/coder/)
|
|
170
|
-
- [API Docs](https://free.ai/api/)
|
|
182
|
+
- [Free.ai](https://free.ai): 400+ free AI tools
|
|
183
|
+
- [Web IDE](https://free.ai/coder/): Use in your browser
|
|
184
|
+
- [API Docs](https://free.ai/api/): Build on top of Free.ai
|
|
171
185
|
- [Compare vs Claude Code](https://free.ai/compare/coder-vs-claude-code/)
|
|
172
186
|
- [Compare vs Cursor](https://free.ai/compare/coder-vs-cursor/)
|
|
173
187
|
|
|
@@ -177,7 +191,7 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
177
191
|
|---------|--------------|-------------|--------------|--------|----------------|
|
|
178
192
|
| Free tier | 50K tokens/day | None ($20/mo) | None ($200/mo) | None ($20/mo) | None ($10/mo) |
|
|
179
193
|
| Self-hosted models | Yes (Qwen, DeepSeek) | No | No | No | No |
|
|
180
|
-
| BYOK (bring your own key) | Yes
|
|
194
|
+
| BYOK (bring your own key) | Yes: $0 markup | No | No | Partial | No |
|
|
181
195
|
| Open source CLI | Yes (MIT) | No | No | No | No |
|
|
182
196
|
| Web IDE | Yes (free.ai/coder/) | No | Yes | Yes | No |
|
|
183
197
|
| Terminal access | Yes | Yes | Yes | Yes | No |
|
|
@@ -186,7 +200,7 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
186
200
|
|
|
187
201
|
## BYOK (Bring Your Own Key)
|
|
188
202
|
|
|
189
|
-
Use your own API keys from any provider
|
|
203
|
+
Use your own API keys from any provider: zero markup, zero fees. Free.ai just proxies the request.
|
|
190
204
|
|
|
191
205
|
```bash
|
|
192
206
|
# OpenAI
|
|
@@ -218,13 +232,13 @@ free-code
|
|
|
218
232
|
|
|
219
233
|
## Free.ai Ecosystem
|
|
220
234
|
|
|
221
|
-
- **[Free.ai](https://free.ai)
|
|
222
|
-
- **[Python SDK](https://github.com/
|
|
223
|
-
- **[CLI Coder](https://github.com/
|
|
224
|
-
- **[iOS App](https://free.ai/ios/)
|
|
225
|
-
- **[Android App](https://free.ai/android/)
|
|
226
|
-
- **[API Docs](https://free.ai/api/)
|
|
227
|
-
- **[Web IDE](https://free.ai/coder/)
|
|
235
|
+
- **[Free.ai](https://free.ai)**: 400+ free AI tools on the web
|
|
236
|
+
- **[Python SDK](https://github.com/muddyholdings/free-sdk)**: `pip install free-dot-ai`: use Free.ai from your code
|
|
237
|
+
- **[CLI Coder](https://github.com/muddyholdings/free-code)**: `pip install freeai-code`: AI coding in your terminal
|
|
238
|
+
- **[iOS App](https://free.ai/ios/)**: Native iPhone/iPad app
|
|
239
|
+
- **[Android App](https://free.ai/android/)**: Native Android app
|
|
240
|
+
- **[API Docs](https://free.ai/api/)**: Build on top of Free.ai
|
|
241
|
+
- **[Web IDE](https://free.ai/coder/)**: Code in your browser
|
|
228
242
|
|
|
229
243
|
## License
|
|
230
244
|
|
|
@@ -6,17 +6,31 @@ Free AI coding assistant for your terminal. A free, open-source alternative to C
|
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
+
One line, nothing to set up first (no Python, no pip, no sudo). It uses [uv](https://docs.astral.sh/uv/) and installs it for you if missing.
|
|
10
|
+
|
|
9
11
|
```bash
|
|
10
|
-
#
|
|
11
|
-
curl -fsSL https://free.ai/install | sh
|
|
12
|
+
# macOS / Linux
|
|
13
|
+
curl -fsSL https://free.ai/install.sh | sh
|
|
14
|
+
```
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
```powershell
|
|
17
|
+
# Windows (PowerShell)
|
|
18
|
+
irm https://free.ai/install.ps1 | iex
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Re-run the same line to upgrade. Pin a version with `FREE_CODE_VERSION=0.1.4` (PowerShell: `$env:FREE_CODE_VERSION = "0.1.4"`). The scripts are in [`install/`](install/): they use uv, else pipx, else a private venv in `~/.free-code`, and put `free-code` in `~/.local/bin`.
|
|
15
22
|
|
|
16
|
-
|
|
23
|
+
Already have Python or Node?
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install freeai-code
|
|
17
27
|
npm install -g freeai-code
|
|
18
28
|
```
|
|
19
29
|
|
|
30
|
+
## First run
|
|
31
|
+
|
|
32
|
+
Run `free-code` in a project. The free anonymous tier works with no account. When the daily anonymous limit is used up, the CLI tells you to get a free key (no card) at https://free.ai/account/#api-keys and run `free-code login`.
|
|
33
|
+
|
|
20
34
|
## Quick Start
|
|
21
35
|
|
|
22
36
|
```bash
|
|
@@ -60,12 +74,12 @@ free-code init
|
|
|
60
74
|
- Streaming output with syntax highlighting
|
|
61
75
|
- Context window optimization and repo map generation
|
|
62
76
|
- .gitignore-aware file discovery
|
|
63
|
-
- Session sync
|
|
64
|
-
- Cloud tasks
|
|
77
|
+
- Session sync: continue conversations from [web](https://free.ai/coder/) to CLI and back
|
|
78
|
+
- Cloud tasks: run long coding tasks on Free.ai's GPUs and pick up the result later
|
|
65
79
|
|
|
66
80
|
## Cloud Tasks
|
|
67
81
|
|
|
68
|
-
Run a coding task on Free.ai's infrastructure instead of your machine
|
|
82
|
+
Run a coding task on Free.ai's infrastructure instead of your machine: like a codex agent from the terminal. Requires an API key: run `free-code login` and paste a key from [free.ai/developer](https://free.ai/developer/) (free tier works).
|
|
69
83
|
|
|
70
84
|
```bash
|
|
71
85
|
# Submit and watch (polls until done, prints the markdown report)
|
|
@@ -92,7 +106,7 @@ Config is stored at `~/.free-code/config.yaml`.
|
|
|
92
106
|
# Set your Free.ai token (get one at https://free.ai/account/)
|
|
93
107
|
free-code config set token sk-free-xxx
|
|
94
108
|
|
|
95
|
-
# Use your own API key (BYOK
|
|
109
|
+
# Use your own API key (BYOK: no markup, use your own provider)
|
|
96
110
|
free-code config set provider openai
|
|
97
111
|
free-code config set api_key sk-xxx
|
|
98
112
|
|
|
@@ -108,10 +122,10 @@ free-code config set safe_mode true
|
|
|
108
122
|
| Provider | Default Model | Free Tier |
|
|
109
123
|
|----------|--------------|-----------|
|
|
110
124
|
| **free.ai** (default) | Qwen 7B | 50K tokens/day |
|
|
111
|
-
| **openai** | GPT-4o | BYOK
|
|
112
|
-
| **anthropic** | Claude Sonnet 4 | BYOK
|
|
113
|
-
| **google** | Gemini 2.5 Pro | BYOK
|
|
114
|
-
| **openrouter** | 346+ models | BYOK
|
|
125
|
+
| **openai** | GPT-4o | BYOK: no markup |
|
|
126
|
+
| **anthropic** | Claude Sonnet 4 | BYOK: no markup |
|
|
127
|
+
| **google** | Gemini 2.5 Pro | BYOK: no markup |
|
|
128
|
+
| **openrouter** | 346+ models | BYOK: no markup |
|
|
115
129
|
|
|
116
130
|
## How It Works
|
|
117
131
|
|
|
@@ -128,13 +142,13 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
128
142
|
- **Anonymous**: 10K tokens/day (Qwen Coder only)
|
|
129
143
|
- **Free account**: 50K tokens/day (sign up at [free.ai](https://free.ai/signup/))
|
|
130
144
|
- **Paid plans**: From $5/month for 200K tokens ([pricing](https://free.ai/pricing/))
|
|
131
|
-
- **BYOK**: $0
|
|
145
|
+
- **BYOK**: $0: bring your own API key, no markup
|
|
132
146
|
|
|
133
147
|
## Links
|
|
134
148
|
|
|
135
|
-
- [Free.ai](https://free.ai)
|
|
136
|
-
- [Web IDE](https://free.ai/coder/)
|
|
137
|
-
- [API Docs](https://free.ai/api/)
|
|
149
|
+
- [Free.ai](https://free.ai): 400+ free AI tools
|
|
150
|
+
- [Web IDE](https://free.ai/coder/): Use in your browser
|
|
151
|
+
- [API Docs](https://free.ai/api/): Build on top of Free.ai
|
|
138
152
|
- [Compare vs Claude Code](https://free.ai/compare/coder-vs-claude-code/)
|
|
139
153
|
- [Compare vs Cursor](https://free.ai/compare/coder-vs-cursor/)
|
|
140
154
|
|
|
@@ -144,7 +158,7 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
144
158
|
|---------|--------------|-------------|--------------|--------|----------------|
|
|
145
159
|
| Free tier | 50K tokens/day | None ($20/mo) | None ($200/mo) | None ($20/mo) | None ($10/mo) |
|
|
146
160
|
| Self-hosted models | Yes (Qwen, DeepSeek) | No | No | No | No |
|
|
147
|
-
| BYOK (bring your own key) | Yes
|
|
161
|
+
| BYOK (bring your own key) | Yes: $0 markup | No | No | Partial | No |
|
|
148
162
|
| Open source CLI | Yes (MIT) | No | No | No | No |
|
|
149
163
|
| Web IDE | Yes (free.ai/coder/) | No | Yes | Yes | No |
|
|
150
164
|
| Terminal access | Yes | Yes | Yes | Yes | No |
|
|
@@ -153,7 +167,7 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
153
167
|
|
|
154
168
|
## BYOK (Bring Your Own Key)
|
|
155
169
|
|
|
156
|
-
Use your own API keys from any provider
|
|
170
|
+
Use your own API keys from any provider: zero markup, zero fees. Free.ai just proxies the request.
|
|
157
171
|
|
|
158
172
|
```bash
|
|
159
173
|
# OpenAI
|
|
@@ -185,13 +199,13 @@ free-code
|
|
|
185
199
|
|
|
186
200
|
## Free.ai Ecosystem
|
|
187
201
|
|
|
188
|
-
- **[Free.ai](https://free.ai)
|
|
189
|
-
- **[Python SDK](https://github.com/
|
|
190
|
-
- **[CLI Coder](https://github.com/
|
|
191
|
-
- **[iOS App](https://free.ai/ios/)
|
|
192
|
-
- **[Android App](https://free.ai/android/)
|
|
193
|
-
- **[API Docs](https://free.ai/api/)
|
|
194
|
-
- **[Web IDE](https://free.ai/coder/)
|
|
202
|
+
- **[Free.ai](https://free.ai)**: 400+ free AI tools on the web
|
|
203
|
+
- **[Python SDK](https://github.com/muddyholdings/free-sdk)**: `pip install free-dot-ai`: use Free.ai from your code
|
|
204
|
+
- **[CLI Coder](https://github.com/muddyholdings/free-code)**: `pip install freeai-code`: AI coding in your terminal
|
|
205
|
+
- **[iOS App](https://free.ai/ios/)**: Native iPhone/iPad app
|
|
206
|
+
- **[Android App](https://free.ai/android/)**: Native Android app
|
|
207
|
+
- **[API Docs](https://free.ai/api/)**: Build on top of Free.ai
|
|
208
|
+
- **[Web IDE](https://free.ai/coder/)**: Code in your browser
|
|
195
209
|
|
|
196
210
|
## License
|
|
197
211
|
|
|
@@ -29,7 +29,7 @@ def login_flow() -> None:
|
|
|
29
29
|
"""Interactive login flow."""
|
|
30
30
|
config = load_config()
|
|
31
31
|
console.print()
|
|
32
|
-
console.print("[bold]Free.ai Coder
|
|
32
|
+
console.print("[bold]Free.ai Coder: Login[/bold]")
|
|
33
33
|
console.print()
|
|
34
34
|
|
|
35
35
|
provider = Prompt.ask(
|
|
@@ -41,7 +41,7 @@ def login_flow() -> None:
|
|
|
41
41
|
if provider == "free.ai":
|
|
42
42
|
console.print()
|
|
43
43
|
console.print("Free.ai offers free daily limits with no account required.")
|
|
44
|
-
console.print("For higher limits, get a
|
|
44
|
+
console.print("For higher limits, get a free key at [link=https://free.ai/account/#api-keys]https://free.ai/account/#api-keys[/link]")
|
|
45
45
|
console.print()
|
|
46
46
|
token = Prompt.ask("Free.ai token (press Enter to skip)", default="")
|
|
47
47
|
if token:
|
|
@@ -64,7 +64,7 @@ def login_flow() -> None:
|
|
|
64
64
|
|
|
65
65
|
api_key = Prompt.ask(f"\n{key_name}")
|
|
66
66
|
if not api_key:
|
|
67
|
-
console.print("[red]API key is required for {provider}.[/red]")
|
|
67
|
+
console.print(f"[red]API key is required for {provider}.[/red]")
|
|
68
68
|
sys.exit(1)
|
|
69
69
|
|
|
70
70
|
set_config_value("provider", provider)
|
|
@@ -19,6 +19,19 @@ from free_code.models import get_model
|
|
|
19
19
|
|
|
20
20
|
DEFAULT_TIMEOUT = 120.0
|
|
21
21
|
|
|
22
|
+
KEY_URL = "https://free.ai/account/#api-keys"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def api_error_message(provider: str, status: int, body: str) -> str:
|
|
26
|
+
"""Turn an API error into a message that says what to do next."""
|
|
27
|
+
msg = f"API error {status}: {body}"
|
|
28
|
+
if provider == "free.ai" and status in (401, 402, 403, 429):
|
|
29
|
+
what = "The free anonymous limit for today is used up." if status == 429 else "Free.ai needs a key for this request."
|
|
30
|
+
msg += (
|
|
31
|
+
f"\n{what} Get a free key (no card) at {KEY_URL}, then run: free-code login"
|
|
32
|
+
)
|
|
33
|
+
return msg
|
|
34
|
+
|
|
22
35
|
|
|
23
36
|
class CoderClient:
|
|
24
37
|
"""API client for the Free.ai Coder agent or direct LLM calls."""
|
|
@@ -80,7 +93,7 @@ class CoderClient:
|
|
|
80
93
|
body = await response.aread()
|
|
81
94
|
yield {
|
|
82
95
|
"type": "error",
|
|
83
|
-
"content":
|
|
96
|
+
"content": api_error_message(self.provider, response.status_code, body.decode(errors="replace")),
|
|
84
97
|
}
|
|
85
98
|
return
|
|
86
99
|
|
|
@@ -138,7 +151,7 @@ class CoderClient:
|
|
|
138
151
|
body = await response.aread()
|
|
139
152
|
yield {
|
|
140
153
|
"type": "error",
|
|
141
|
-
"content":
|
|
154
|
+
"content": api_error_message(self.provider, response.status_code, body.decode(errors="replace")),
|
|
142
155
|
}
|
|
143
156
|
return
|
|
144
157
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: freeai-code
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Free AI coding assistant — open-source Claude Code alternative. pip install freeai-code
|
|
5
5
|
Author-email: "Free.ai" <hello@free.ai>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://free.ai/coder/
|
|
8
8
|
Project-URL: Documentation, https://free.ai/api/
|
|
9
|
-
Project-URL: Repository, https://github.com/
|
|
10
|
-
Project-URL: Bug Tracker, https://github.com/
|
|
9
|
+
Project-URL: Repository, https://github.com/muddyholdings/free-code
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/muddyholdings/free-code/issues
|
|
11
11
|
Project-URL: Changelog, https://free.ai/changelog/
|
|
12
12
|
Keywords: ai,coding,assistant,cli,free,claude-code,cursor,copilot
|
|
13
13
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -39,17 +39,31 @@ Free AI coding assistant for your terminal. A free, open-source alternative to C
|
|
|
39
39
|
|
|
40
40
|
## Install
|
|
41
41
|
|
|
42
|
+
One line, nothing to set up first (no Python, no pip, no sudo). It uses [uv](https://docs.astral.sh/uv/) and installs it for you if missing.
|
|
43
|
+
|
|
42
44
|
```bash
|
|
43
|
-
#
|
|
44
|
-
curl -fsSL https://free.ai/install | sh
|
|
45
|
+
# macOS / Linux
|
|
46
|
+
curl -fsSL https://free.ai/install.sh | sh
|
|
47
|
+
```
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
```powershell
|
|
50
|
+
# Windows (PowerShell)
|
|
51
|
+
irm https://free.ai/install.ps1 | iex
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Re-run the same line to upgrade. Pin a version with `FREE_CODE_VERSION=0.1.4` (PowerShell: `$env:FREE_CODE_VERSION = "0.1.4"`). The scripts are in [`install/`](install/): they use uv, else pipx, else a private venv in `~/.free-code`, and put `free-code` in `~/.local/bin`.
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
Already have Python or Node?
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install freeai-code
|
|
50
60
|
npm install -g freeai-code
|
|
51
61
|
```
|
|
52
62
|
|
|
63
|
+
## First run
|
|
64
|
+
|
|
65
|
+
Run `free-code` in a project. The free anonymous tier works with no account. When the daily anonymous limit is used up, the CLI tells you to get a free key (no card) at https://free.ai/account/#api-keys and run `free-code login`.
|
|
66
|
+
|
|
53
67
|
## Quick Start
|
|
54
68
|
|
|
55
69
|
```bash
|
|
@@ -93,12 +107,12 @@ free-code init
|
|
|
93
107
|
- Streaming output with syntax highlighting
|
|
94
108
|
- Context window optimization and repo map generation
|
|
95
109
|
- .gitignore-aware file discovery
|
|
96
|
-
- Session sync
|
|
97
|
-
- Cloud tasks
|
|
110
|
+
- Session sync: continue conversations from [web](https://free.ai/coder/) to CLI and back
|
|
111
|
+
- Cloud tasks: run long coding tasks on Free.ai's GPUs and pick up the result later
|
|
98
112
|
|
|
99
113
|
## Cloud Tasks
|
|
100
114
|
|
|
101
|
-
Run a coding task on Free.ai's infrastructure instead of your machine
|
|
115
|
+
Run a coding task on Free.ai's infrastructure instead of your machine: like a codex agent from the terminal. Requires an API key: run `free-code login` and paste a key from [free.ai/developer](https://free.ai/developer/) (free tier works).
|
|
102
116
|
|
|
103
117
|
```bash
|
|
104
118
|
# Submit and watch (polls until done, prints the markdown report)
|
|
@@ -125,7 +139,7 @@ Config is stored at `~/.free-code/config.yaml`.
|
|
|
125
139
|
# Set your Free.ai token (get one at https://free.ai/account/)
|
|
126
140
|
free-code config set token sk-free-xxx
|
|
127
141
|
|
|
128
|
-
# Use your own API key (BYOK
|
|
142
|
+
# Use your own API key (BYOK: no markup, use your own provider)
|
|
129
143
|
free-code config set provider openai
|
|
130
144
|
free-code config set api_key sk-xxx
|
|
131
145
|
|
|
@@ -141,10 +155,10 @@ free-code config set safe_mode true
|
|
|
141
155
|
| Provider | Default Model | Free Tier |
|
|
142
156
|
|----------|--------------|-----------|
|
|
143
157
|
| **free.ai** (default) | Qwen 7B | 50K tokens/day |
|
|
144
|
-
| **openai** | GPT-4o | BYOK
|
|
145
|
-
| **anthropic** | Claude Sonnet 4 | BYOK
|
|
146
|
-
| **google** | Gemini 2.5 Pro | BYOK
|
|
147
|
-
| **openrouter** | 346+ models | BYOK
|
|
158
|
+
| **openai** | GPT-4o | BYOK: no markup |
|
|
159
|
+
| **anthropic** | Claude Sonnet 4 | BYOK: no markup |
|
|
160
|
+
| **google** | Gemini 2.5 Pro | BYOK: no markup |
|
|
161
|
+
| **openrouter** | 346+ models | BYOK: no markup |
|
|
148
162
|
|
|
149
163
|
## How It Works
|
|
150
164
|
|
|
@@ -161,13 +175,13 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
161
175
|
- **Anonymous**: 10K tokens/day (Qwen Coder only)
|
|
162
176
|
- **Free account**: 50K tokens/day (sign up at [free.ai](https://free.ai/signup/))
|
|
163
177
|
- **Paid plans**: From $5/month for 200K tokens ([pricing](https://free.ai/pricing/))
|
|
164
|
-
- **BYOK**: $0
|
|
178
|
+
- **BYOK**: $0: bring your own API key, no markup
|
|
165
179
|
|
|
166
180
|
## Links
|
|
167
181
|
|
|
168
|
-
- [Free.ai](https://free.ai)
|
|
169
|
-
- [Web IDE](https://free.ai/coder/)
|
|
170
|
-
- [API Docs](https://free.ai/api/)
|
|
182
|
+
- [Free.ai](https://free.ai): 400+ free AI tools
|
|
183
|
+
- [Web IDE](https://free.ai/coder/): Use in your browser
|
|
184
|
+
- [API Docs](https://free.ai/api/): Build on top of Free.ai
|
|
171
185
|
- [Compare vs Claude Code](https://free.ai/compare/coder-vs-claude-code/)
|
|
172
186
|
- [Compare vs Cursor](https://free.ai/compare/coder-vs-cursor/)
|
|
173
187
|
|
|
@@ -177,7 +191,7 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
177
191
|
|---------|--------------|-------------|--------------|--------|----------------|
|
|
178
192
|
| Free tier | 50K tokens/day | None ($20/mo) | None ($200/mo) | None ($20/mo) | None ($10/mo) |
|
|
179
193
|
| Self-hosted models | Yes (Qwen, DeepSeek) | No | No | No | No |
|
|
180
|
-
| BYOK (bring your own key) | Yes
|
|
194
|
+
| BYOK (bring your own key) | Yes: $0 markup | No | No | Partial | No |
|
|
181
195
|
| Open source CLI | Yes (MIT) | No | No | No | No |
|
|
182
196
|
| Web IDE | Yes (free.ai/coder/) | No | Yes | Yes | No |
|
|
183
197
|
| Terminal access | Yes | Yes | Yes | Yes | No |
|
|
@@ -186,7 +200,7 @@ All file operations happen locally on your machine. The AI sees only what it nee
|
|
|
186
200
|
|
|
187
201
|
## BYOK (Bring Your Own Key)
|
|
188
202
|
|
|
189
|
-
Use your own API keys from any provider
|
|
203
|
+
Use your own API keys from any provider: zero markup, zero fees. Free.ai just proxies the request.
|
|
190
204
|
|
|
191
205
|
```bash
|
|
192
206
|
# OpenAI
|
|
@@ -218,13 +232,13 @@ free-code
|
|
|
218
232
|
|
|
219
233
|
## Free.ai Ecosystem
|
|
220
234
|
|
|
221
|
-
- **[Free.ai](https://free.ai)
|
|
222
|
-
- **[Python SDK](https://github.com/
|
|
223
|
-
- **[CLI Coder](https://github.com/
|
|
224
|
-
- **[iOS App](https://free.ai/ios/)
|
|
225
|
-
- **[Android App](https://free.ai/android/)
|
|
226
|
-
- **[API Docs](https://free.ai/api/)
|
|
227
|
-
- **[Web IDE](https://free.ai/coder/)
|
|
235
|
+
- **[Free.ai](https://free.ai)**: 400+ free AI tools on the web
|
|
236
|
+
- **[Python SDK](https://github.com/muddyholdings/free-sdk)**: `pip install free-dot-ai`: use Free.ai from your code
|
|
237
|
+
- **[CLI Coder](https://github.com/muddyholdings/free-code)**: `pip install freeai-code`: AI coding in your terminal
|
|
238
|
+
- **[iOS App](https://free.ai/ios/)**: Native iPhone/iPad app
|
|
239
|
+
- **[Android App](https://free.ai/android/)**: Native Android app
|
|
240
|
+
- **[API Docs](https://free.ai/api/)**: Build on top of Free.ai
|
|
241
|
+
- **[Web IDE](https://free.ai/coder/)**: Code in your browser
|
|
228
242
|
|
|
229
243
|
## License
|
|
230
244
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "freeai-code"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.4"
|
|
4
4
|
description = "Free AI coding assistant — open-source Claude Code alternative. pip install freeai-code"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.9"
|
|
@@ -34,8 +34,8 @@ free-code = "free_code.cli:main"
|
|
|
34
34
|
[project.urls]
|
|
35
35
|
Homepage = "https://free.ai/coder/"
|
|
36
36
|
Documentation = "https://free.ai/api/"
|
|
37
|
-
Repository = "https://github.com/
|
|
38
|
-
"Bug Tracker" = "https://github.com/
|
|
37
|
+
Repository = "https://github.com/muddyholdings/free-code"
|
|
38
|
+
"Bug Tracker" = "https://github.com/muddyholdings/free-code/issues"
|
|
39
39
|
Changelog = "https://free.ai/changelog/"
|
|
40
40
|
|
|
41
41
|
[build-system]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|