diff --git a/packages/apollo-cli/README.md b/packages/apollo-cli/README.md index 42a88c2e..18e3ea99 100644 --- a/packages/apollo-cli/README.md +++ b/packages/apollo-cli/README.md @@ -17,7 +17,7 @@ $ npm install -g @apollo-annotation/cli $ apollo COMMAND running command... $ apollo (--version) -@apollo-annotation/cli/0.1.19 darwin-x64 node-v20.10.0 +@apollo-annotation/cli/0.1.19 linux-x64 node-v20.17.0 $ apollo --help [COMMAND] USAGE $ apollo COMMAND @@ -41,8 +41,8 @@ USAGE - [`apollo feature`](../website/docs/cli//feature.md) - Commands to handle features - [`apollo help`](../website/docs/cli//help.md) - Display help for apollo. -- [`apollo jbrowse`](../website/docs/cli//jbrowse.md) - Get Jbrowse - configuration from Apollo +- [`apollo jbrowse`](../website/docs/cli//jbrowse.md) - Commands to manage the + JBrowse configuration - [`apollo login`](../website/docs/cli//login.md) - Login to Apollo - [`apollo logout`](../website/docs/cli//logout.md) - Logout of Apollo - [`apollo refseq`](../website/docs/cli//refseq.md) - Commands to handle diff --git a/packages/apollo-cli/package.json b/packages/apollo-cli/package.json index f80f3938..54d9e107 100644 --- a/packages/apollo-cli/package.json +++ b/packages/apollo-cli/package.json @@ -53,6 +53,9 @@ "feature": { "description": "Commands to handle features" }, + "jbrowse": { + "description": "Commands to manage the JBrowse configuration" + }, "refseq": { "description": "Commands to handle reference sequences" }, diff --git a/packages/apollo-cli/src/commands/jbrowse/get-config.ts b/packages/apollo-cli/src/commands/jbrowse/get-config.ts index da55fd8a..2fd4e70f 100644 --- a/packages/apollo-cli/src/commands/jbrowse/get-config.ts +++ b/packages/apollo-cli/src/commands/jbrowse/get-config.ts @@ -2,11 +2,18 @@ import { BaseCommand } from '../../baseCommand.js' import { wrapLines, queryApollo } from '../../utils.js' export default class GetConfig extends BaseCommand { - static summary = 'Get Jbrowse configuration from Apollo' + static summary = 'Get JBrowse configuration from Apollo' static description = wrapLines( - 'Print to stdout the Jbrowse configuration from Apollo in json format', + 'Print to stdout the JBrowse configuration from Apollo in JSON format', ) + static examples = [ + { + description: 'Get JBrowse configuration:', + command: '<%= config.bin %> <%= command.id %> > config.json', + }, + ] + public async run(): Promise { const { flags } = await this.parse(GetConfig) @@ -20,7 +27,7 @@ export default class GetConfig extends BaseCommand { ) if (!response.ok) { - throw new Error('Failed to fetch jbrowse configuration') + throw new Error('Failed to fetch JBrowse configuration') } const json = (await response.json()) as object diff --git a/packages/apollo-cli/src/commands/jbrowse/set-config.ts b/packages/apollo-cli/src/commands/jbrowse/set-config.ts index 53c0dfad..8539ee42 100644 --- a/packages/apollo-cli/src/commands/jbrowse/set-config.ts +++ b/packages/apollo-cli/src/commands/jbrowse/set-config.ts @@ -14,21 +14,21 @@ import { } from '../../utils.js' export default class SetConfig extends BaseCommand { - static summary = 'Add jbrowse configuration' + static summary = 'Set JBrowse configuration' static description = wrapLines( - 'Add jbrowse configuration into apollo database', + 'Set JBrowse configuration in Apollo collaboration server', ) static examples = [ { - description: 'Add jbrowse configuration:', + description: 'Add JBrowse configuration:', command: '<%= config.bin %> <%= command.id %> config.json', }, ] static args = { inputFile: Args.string({ - description: 'Input jbrowse configuration file', + description: 'JBrowse configuration file', required: true, }), } @@ -65,10 +65,9 @@ export default class SetConfig extends BaseCommand { if (!response.ok) { const errorMessage = await createFetchErrorMessage( response, - 'Failed to add jbrowse configuration', + 'Failed to add JBrowse configuration', ) throw new ConfigError(errorMessage) } - this.log('Jbrowse configuartion added successfully to apollo') } } diff --git a/packages/website/docs/cli/jbrowse.md b/packages/website/docs/cli/jbrowse.md index 2b1a2662..781b981b 100644 --- a/packages/website/docs/cli/jbrowse.md +++ b/packages/website/docs/cli/jbrowse.md @@ -1,13 +1,13 @@ # `apollo jbrowse` -Get Jbrowse configuration from Apollo +Commands to manage the JBrowse configuration - [`apollo jbrowse get-config`](#apollo-jbrowse-get-config) - [`apollo jbrowse set-config INPUTFILE`](#apollo-jbrowse-set-config-inputfile) ## `apollo jbrowse get-config` -Get Jbrowse configuration from Apollo +Get JBrowse configuration from Apollo ``` USAGE @@ -18,9 +18,14 @@ FLAGS --profile= Use credentials from this profile DESCRIPTION - Get Jbrowse configuration from Apollo + Get JBrowse configuration from Apollo - Print to stdout the Jbrowse configuration from Apollo in json format + Print to stdout the JBrowse configuration from Apollo in JSON format + +EXAMPLES + Get JBrowse configuration: + + $ apollo jbrowse get-config > config.json ``` _See code: @@ -28,26 +33,26 @@ _See code: ## `apollo jbrowse set-config INPUTFILE` -Add jbrowse configuration +Set JBrowse configuration ``` USAGE $ apollo jbrowse set-config INPUTFILE [--profile ] [--config-file ] ARGUMENTS - INPUTFILE Input jbrowse configuration file + INPUTFILE JBrowse configuration file FLAGS --config-file= Use this config file (mostly for testing) --profile= Use credentials from this profile DESCRIPTION - Add jbrowse configuration + Set JBrowse configuration - Add jbrowse configuration into apollo database + Set JBrowse configuration in Apollo collaboration server EXAMPLES - Add jbrowse configuration: + Add JBrowse configuration: $ apollo jbrowse set-config config.json ```