Skip to content

feat(cli): support ALIEN_PROJECT env var for --project - #494

Merged
alongubkin merged 2 commits into
mainfrom
alan/alien-578-add-env-var-for-alien-project-for-cli
Aug 25, 2026
Merged

feat(cli): support ALIEN_PROJECT env var for --project#494
alongubkin merged 2 commits into
mainfrom
alan/alien-578-add-env-var-for-alien-project-for-cli

Conversation

@ab-alien-dev

Copy link
Copy Markdown
Contributor

Summary

  • Adds env = "ALIEN_PROJECT" to the CLI's global --project flag, matching the existing ALIEN_API_KEY/ALIEN_WORKSPACE pattern.
  • Lets callers that prefer environment variables (e.g. the ai-agent sandbox, which already resolves and passes --project explicitly per invocation) set the project once via env instead of a flag on every call.

Test plan

  • Additive change to an existing Option<String> field's input sources — no behavior change when the env var is unset.
  • cargo build -p alien-cli / relevant CLI tests pass in CI.

Matches the existing ALIEN_API_KEY/ALIEN_WORKSPACE env var pattern,
letting callers (e.g. the ai-agent sandbox) supply the project via
environment instead of a flag on every invocation.
@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds ALIEN_PROJECT as an environment-backed source for the global project option and normalizes blank or whitespace-only values before platform project resolution.

  • Preserves linked-project and interactive fallback when ALIEN_PROJECT is blank.
  • Trims surrounding whitespace from nonblank global project values.
  • Adds focused unit coverage for both normalization cases.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/alien-cli/src/lib.rs Adds the environment-backed global project input and applies blank-value normalization at its sole execution-context consumption point.

Reviews (2): Last reviewed commit: "Fix greptile" | Re-trigger Greptile

Comment thread crates/alien-cli/src/lib.rs
@alongubkin
alongubkin merged commit dfcbf6c into main Aug 25, 2026
23 checks passed
@alongubkin
alongubkin deleted the alan/alien-578-add-env-var-for-alien-project-for-cli branch August 25, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants