cli: discuss scoping for keychain-backed auth storage
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- authentication, cli, security
Research direction
Read packages/cli/src/user.ts and trace auth login, auth configure, auth logout, and config reads in api.ts. Review the proposed separation of secret and local fields, migration needs, and cross-platform backend constraints. Done requires maintainer agreement on scope and a narrower implementation issue, since this issue currently asks design questions rather than specifying a change.
Written by the indexing model from the issue text.
Description
Context
There is a TODO in packages/cli/src/user.ts:
export const USER_CONFIG_PATH = path.join(os.homedir(), '.e2b', 'config.json') // TODO: Keep in Keychain
The current CLI stores the following fields in ~/.e2b/config.json:
emailaccessTokenteamNameteamIdteamApiKeydockerProxySet
Problem
Moving this whole file directly into the system keychain looks desirable from a security perspective, but the implementation surface seems fairly large for an external contribution:
- touches the auth flow (
auth login,auth configure,auth logout) - affects config reads in
api.ts - needs migration for existing
~/.e2b/config.json - requires a cross-platform secret storage backend (macOS Keychain / Windows Credential Manager / Linux Secret Service)
- likely introduces native/runtime dependency tradeoffs for the npm CLI
In addition, not all fields seem equally suitable for keychain storage. For example, dockerProxySet and team metadata look more like regular local config, while accessToken and teamApiKey are the actual secrets.
Proposal
Would you be open to splitting this work into smaller stages?
Stage 1
Refactor the CLI to separate:
- non-secret local metadata stored on disk
- secret values behind a dedicated secret-store interface
This stage could keep the current file-backed behavior and avoid changing user-visible behavior.
Stage 2
Introduce a real OS-backed secret store for the sensitive fields only:
accessTokenteamApiKey
This would also make it easier to discuss migration strategy and dependency choice separately.
Questions for maintainers
- Is the intended direction to move the entire user config into keychain storage, or only the sensitive fields?
- Would you accept an initial refactor PR that only introduces the storage boundary without yet adding a keychain backend?
- Do you already have a preferred cross-platform secret storage library / approach for the CLI?
If this direction sounds reasonable, I can follow up with a narrower implementation issue or PR proposal.
- Dominant language
- Python
- Stars
- 13.9k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 70
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from e2b-dev/E2B
-
bug Code Interpreter javascript sdk
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug Code Interpreter sdk
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
JS SuperChart deserializer reads data instead of elements, and Result never deserializes charts Openbug Code Interpreter sdk
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug Code Interpreter sdk
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
envd feature sdk
Difficulty 5/5 Over a week Newbie friendliness 38/100
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100