mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(cli): dockerize (#6858)
* import dockerfile from old cli * build works * rename login command * bump packages * fix login command * chore: remove axios dependency from CLI * move immich script path * can build docker * wip * wip * don't externalize sdk * can run docker * improve entrypoint * can save auth state between runs * add docs * clarify reqs * fix lint * bump alpine to 3.19 * add env files for api key * remove immich cli GHA for now * Update docs/docs/features/command-line-interface.md Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> * remove redundant env variable check * cleanup * speling --------- Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
This commit is contained in:
parent
9b3764dbcf
commit
31eb4790dc
8 changed files with 46 additions and 31 deletions
|
|
@ -3,19 +3,22 @@ import { Command, Option } from 'commander';
|
|||
import path from 'node:path';
|
||||
import os from 'node:os';
|
||||
import { version } from '../package.json';
|
||||
import { LoginCommand } from './commands/login';
|
||||
import { LoginCommand } from './commands/login.command';
|
||||
import { LogoutCommand } from './commands/logout.command';
|
||||
import { ServerInfoCommand } from './commands/server-info.command';
|
||||
import { UploadCommand } from './commands/upload.command';
|
||||
|
||||
const homeDirectory = os.homedir();
|
||||
const configDirectory = path.join(homeDirectory, '.config/immich/');
|
||||
const defaultConfigDirectory = path.join(os.homedir(), '.config/immich/');
|
||||
|
||||
const program = new Command()
|
||||
.name('immich')
|
||||
.version(version)
|
||||
.description('Command line interface for Immich')
|
||||
.addOption(new Option('-d, --config', 'Configuration directory').env('IMMICH_CONFIG_DIR').default(configDirectory));
|
||||
.addOption(
|
||||
new Option('-d, --config-directory', 'Configuration directory where auth.yml will be stored')
|
||||
.env('IMMICH_CONFIG_DIR')
|
||||
.default(defaultConfigDirectory),
|
||||
);
|
||||
|
||||
program
|
||||
.command('upload')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue