@toothfairyai/tfcode 1.2.1 → 1.2.4

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.
Files changed (3) hide show
  1. package/README.md +191 -0
  2. package/bin/tfcode +0 -0
  3. package/package.json +13 -13
package/README.md ADDED
@@ -0,0 +1,191 @@
1
+ # TF Code
2
+
3
+ **ToothFairyAI's AI coding agent** — a command-line interface that brings AI-powered coding assistance to your terminal with deep ToothFairyAI workspace integration.
4
+
5
+ ## Agents
6
+
7
+ TF Code ships with three built-in agents:
8
+
9
+ | Agent | Purpose | Key Ability |
10
+ | --------------- | ----------------------------- | ----------------------------------------------------------- |
11
+ | **Build** | Execute and implement | Full read/write access, the default agent |
12
+ | **Plan** | Explore and plan | Read-only analysis, writes plans to `.tfcode/plans/` |
13
+ | **TF Engineer** | Manage ToothFairyAI workspace | Exclusive access to live MCP tools for workspace operations |
14
+
15
+ Switch between them at any time with **Tab** or the `--agent` flag.
16
+
17
+ ## Prerequisites
18
+
19
+ - **Node.js** 18+
20
+ - A modern terminal emulator (WezTerm, Alacritty, Kitty, Ghostty recommended)
21
+ - ToothFairyAI API credentials (from **Admin → TFCode & API Integration**)
22
+
23
+ ## Install
24
+
25
+ ```
26
+ npm install -g @toothfairyai/tfcode
27
+ ```
28
+
29
+ Verify:
30
+
31
+ ```
32
+ tfcode --version
33
+ ```
34
+
35
+ ## Configure
36
+
37
+ Run the interactive setup to create a profile:
38
+
39
+ ```
40
+ tfcode setup
41
+ ```
42
+
43
+ This prompts for profile name, workspace ID, API key, and region. Alternatively, set environment variables:
44
+
45
+ ```
46
+ export TF_WORKSPACE_ID="your-workspace-id"
47
+ export TF_API_KEY="your-api-key"
48
+ export TF_REGION="au"
49
+ ```
50
+
51
+ Validate:
52
+
53
+ ```
54
+ tfcode validate
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ ### Interactive session
60
+
61
+ ```
62
+ tfcode
63
+ ```
64
+
65
+ ### Single command
66
+
67
+ ```
68
+ tfcode run "Explain this codebase"
69
+ ```
70
+
71
+ ### Plan first, then build
72
+
73
+ Use **Tab** to switch to Plan mode, describe what you want, then switch back to Build to implement.
74
+
75
+ 1. **Plan** — describe the feature, review the plan
76
+ 2. **Build** — switch back and ask it to implement
77
+
78
+ ### Workspace management
79
+
80
+ ```
81
+ tfcode run --agent "TF Engineer" "Create a retriever agent called SupportBot"
82
+ tfcode run --agent "TF Engineer" "Search documents about refund policy"
83
+ ```
84
+
85
+ ### Undo changes
86
+
87
+ ```
88
+ /undo
89
+ ```
90
+
91
+ ## Profiles
92
+
93
+ Profiles store multiple sets of ToothFairyAI credentials so you can switch between workspaces instantly.
94
+
95
+ ### Create
96
+
97
+ ```
98
+ tfcode setup
99
+ ```
100
+
101
+ Non-interactive:
102
+
103
+ ```
104
+ tfcode setup --profile dev --workspace-id dev-ws-456 --api-key dev-key-xxx --region dev --name dev
105
+ ```
106
+
107
+ ### Switch
108
+
109
+ ```
110
+ tfcode profile prod
111
+ ```
112
+
113
+ ### Use in commands
114
+
115
+ ```
116
+ tfcode -p prod run "Deploy to production"
117
+ TF_PROFILE=prod tfcode run "Force prod workspace"
118
+ ```
119
+
120
+ ## Regions
121
+
122
+ | Region | Base URL | Streaming URL |
123
+ | ------ | ------------------------ | ------------------------- |
124
+ | `dev` | `ai.toothfairylab.link` | `ais.toothfairylab.link` |
125
+ | `au` | `ai.toothfairyai.com` | `ais.toothfairyai.com` |
126
+ | `eu` | `ai.eu.toothfairyai.com` | `ais.eu.toothfairyai.com` |
127
+ | `us` | `ai.us.toothfairyai.com` | `ais.us.toothfairyai.com` |
128
+
129
+ ## Environment Variables
130
+
131
+ | Variable | Description |
132
+ | ------------------------- | ----------------------------------------------- |
133
+ | `TF_WORKSPACE_ID` | ToothFairyAI workspace ID |
134
+ | `TF_API_KEY` | ToothFairyAI API key |
135
+ | `TF_REGION` | ToothFairyAI region: dev, au, eu, us |
136
+ | `TF_PROFILE` | Profile name to use (overrides default profile) |
137
+ | `TFCODE_SERVER_PASSWORD` | HTTP basic auth password for server mode |
138
+ | `TFCODE_SERVER_USERNAME` | HTTP basic auth username (default: tfcode) |
139
+ | `OPENCODE_CONFIG` | Path to custom config file |
140
+ | `OPENCODE_CONFIG_CONTENT` | Inline config content (highest priority) |
141
+
142
+ ## CLI Commands
143
+
144
+ ### Top-level
145
+
146
+ | Command | Description |
147
+ | --------------------- | ----------------------------------- |
148
+ | `tfcode` | Start interactive session |
149
+ | `tfcode run <prompt>` | Execute a single task and exit |
150
+ | `tfcode serve` | Start headless HTTP server |
151
+ | `tfcode web` | Start server and open web interface |
152
+ | `tfcode attach <url>` | Attach TUI to a running server |
153
+
154
+ ### Setup & credentials
155
+
156
+ | Command | Description |
157
+ | -------------------------- | ------------------------------------------------------ |
158
+ | `tfcode setup` | Interactive credential setup (creates a profile) |
159
+ | `tfcode validate` | Validate credentials (`--profile <name>` for specific) |
160
+ | `tfcode profile` | Show current profile and list all |
161
+ | `tfcode profile <name>` | Switch to a different profile |
162
+ | `tfcode sync` | Sync workspace tools metadata |
163
+ | `tfcode providers list` | List available providers |
164
+ | `tfcode models [provider]` | List available models (optional provider filter) |
165
+ | `tfcode models --verbose` | List models with metadata |
166
+ | `tfcode models --refresh` | Refresh the models cache |
167
+
168
+ ### MCP
169
+
170
+ | Command | Description |
171
+ | ------------------- | ---------------------------------- |
172
+ | `tfcode mcp list` | List MCP servers and tools |
173
+ | `tfcode mcp add` | Add a local MCP server |
174
+ | `tfcode mcp auth` | Authenticate with OAuth MCP server |
175
+ | `tfcode mcp logout` | Logout from MCP server |
176
+
177
+ ### Chat commands (interactive)
178
+
179
+ | Command | Description |
180
+ | ------------------------- | --------------------------------------- |
181
+ | `/compact [instructions]` | Compact context with preservation hints |
182
+ | `/help` | Show available commands |
183
+ | `/undo` | Undo last changes |
184
+
185
+ ## Documentation
186
+
187
+ Full documentation at [https://docs.toothfairyai.com/tfcode/intro](https://docs.toothfairyai.com/tfcode/intro)
188
+
189
+ ## License
190
+
191
+ MIT
package/bin/tfcode CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toothfairyai/tfcode",
3
- "version": "1.2.1",
3
+ "version": "1.2.4",
4
4
  "bin": {
5
5
  "tfcode": "./bin/tfcode.js"
6
6
  },
@@ -9,18 +9,18 @@
9
9
  },
10
10
  "license": "MIT",
11
11
  "optionalDependencies": {
12
- "@toothfairyai/tfcode-linux-arm64": "1.2.1",
13
- "@toothfairyai/tfcode-windows-x64": "1.2.1",
14
- "@toothfairyai/tfcode-linux-x64-baseline-musl": "1.2.1",
15
- "@toothfairyai/tfcode-darwin-x64-baseline": "1.2.1",
16
- "@toothfairyai/tfcode-linux-x64-musl": "1.2.1",
17
- "@toothfairyai/tfcode-windows-x64-baseline": "1.2.1",
18
- "@toothfairyai/tfcode-linux-arm64-musl": "1.2.1",
19
- "@toothfairyai/tfcode-windows-arm64": "1.2.1",
20
- "@toothfairyai/tfcode-linux-x64": "1.2.1",
21
- "@toothfairyai/tfcode-darwin-x64": "1.2.1",
22
- "@toothfairyai/tfcode-linux-x64-baseline": "1.2.1",
23
- "@toothfairyai/tfcode-darwin-arm64": "1.2.1"
12
+ "@toothfairyai/tfcode-linux-arm64": "1.2.4",
13
+ "@toothfairyai/tfcode-windows-x64": "1.2.4",
14
+ "@toothfairyai/tfcode-linux-x64-baseline-musl": "1.2.4",
15
+ "@toothfairyai/tfcode-darwin-x64-baseline": "1.2.4",
16
+ "@toothfairyai/tfcode-linux-x64-musl": "1.2.4",
17
+ "@toothfairyai/tfcode-windows-x64-baseline": "1.2.4",
18
+ "@toothfairyai/tfcode-linux-arm64-musl": "1.2.4",
19
+ "@toothfairyai/tfcode-windows-arm64": "1.2.4",
20
+ "@toothfairyai/tfcode-linux-x64": "1.2.4",
21
+ "@toothfairyai/tfcode-darwin-x64": "1.2.4",
22
+ "@toothfairyai/tfcode-linux-x64-baseline": "1.2.4",
23
+ "@toothfairyai/tfcode-darwin-arm64": "1.2.4"
24
24
  },
25
25
  "engines": {
26
26
  "node": ">=18"