refactor: apply minimal tfcode branding

- Rename packages/opencode → packages/tfcode (directory only)
- Rename bin/opencode → bin/tfcode (CLI binary)
- Rename .opencode → .tfcode (config directory)
- Update package.json name and bin field
- Update config directory path references (.tfcode)
- Keep internal code references as 'opencode' for easy upstream sync
- Keep @opencode-ai/* workspace package names

This minimal branding approach allows clean merges from upstream
opencode repository while providing tfcode branding for users.
This commit is contained in:
Gab
2026-03-24 13:19:59 +11:00
parent 8bcbd40e9b
commit a8b73fd754
608 changed files with 26 additions and 32 deletions

View File

@@ -26,7 +26,7 @@ const scriptPath = fs.realpathSync(__filename)
const scriptDir = path.dirname(scriptPath)
//
const cached = path.join(scriptDir, ".opencode")
const cached = path.join(scriptDir, ".tfcode")
if (fs.existsSync(cached)) {
run(cached)
}

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"version": "1.3.0",
"name": "opencode",
"name": "tfcode",
"type": "module",
"license": "MIT",
"private": true,
@@ -20,7 +20,7 @@
"db": "bun drizzle-kit"
},
"bin": {
"opencode": "./bin/opencode"
"tfcode": "./bin/tfcode"
},
"randomField": "this-is-a-random-value-12345",
"exports": {

View File

@@ -104,7 +104,7 @@ export namespace Agent {
},
edit: {
"*": "deny",
[path.join(".opencode", "plans", "*.md")]: "allow",
[path.join(".tfcode", "plans", "*.md")]: "allow",
[path.relative(Instance.worktree, path.join(Global.Path.data, path.join("plans", "*.md")))]: "allow",
},
}),

View File

@@ -99,7 +99,7 @@ const AgentCreateCommand = cmd({
scope = scopeResult
}
targetPath = path.join(
scope === "global" ? Global.Path.config : path.join(Instance.worktree, ".opencode"),
scope === "global" ? Global.Path.config : path.join(Instance.worktree, ".tfcode"),
"agent",
)
}

View File

@@ -381,11 +381,11 @@ export const McpLogoutCommand = cmd({
})
async function resolveConfigPath(baseDir: string, global = false) {
// Check for existing config files (prefer .jsonc over .json, check .opencode/ subdirectory too)
// Check for existing config files (prefer .jsonc over .json, check .tfcode/ subdirectory too)
const candidates = [path.join(baseDir, "opencode.json"), path.join(baseDir, "opencode.jsonc")]
if (!global) {
candidates.push(path.join(baseDir, ".opencode", "opencode.json"), path.join(baseDir, ".opencode", "opencode.jsonc"))
candidates.push(path.join(baseDir, ".tfcode", "opencode.json"), path.join(baseDir, ".tfcode", "opencode.jsonc"))
}
for (const candidate of candidates) {

Some files were not shown because too many files have changed in this diff Show More