Skip to content

Add doctor and setup CLI commands#30

Merged
fila-ci[bot] merged 1 commit intomainfrom
cli-doctor-setup
Mar 9, 2026
Merged

Add doctor and setup CLI commands#30
fila-ci[bot] merged 1 commit intomainfrom
cli-doctor-setup

Conversation

@arferreira
Copy link
Contributor

New users had to manually create .env, guess which vars are required, hope their PEM was valid, and only discover config problems at runtime when things crash. This adds two CLI commands that make installation self-service.

fila with no args still starts the server — backward compatible, Dockerfile untouched.

fila doctor reads each env var individually (doesn't use AppConfig::from_env() which panics on missing vars) and reports what's present, missing, or broken. Validates the private key as RSA PEM, tests database connectivity, and verifies GitHub API auth by hitting GET /app. Exit code 0 if clean, 1 if anything needs attention.

fila setup is an interactive wizard that prompts for each value with sensible defaults, reads the private key from a file path, and writes a properly formatted .env. Tells you to run fila doctor after.

New public methods on GitHubClient: validate_credentials() (tries JWT generation) and get_app_info() (hits GET /app with Bearer JWT, returns app name/slug). These exist solely so doctor can verify credentials without needing an installation token.

@arferreira
Copy link
Contributor Author

@fila ship

@fila-ci
Copy link
Contributor

fila-ci bot commented Mar 9, 2026

Commit 555d8d2 has been added to the merge queue by @arferreira.

View queue

@fila-ci
Copy link
Contributor

fila-ci bot commented Mar 9, 2026

#30 merged into main (7c3299c)

@fila-ci fila-ci bot closed this Mar 9, 2026
@fila-ci fila-ci bot merged commit 7c3299c into main Mar 9, 2026
1 check passed
@fila-ci fila-ci bot deleted the cli-doctor-setup branch March 9, 2026 04:39
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.

1 participant