File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 * [ info] ( /docs/auth/info.md )
1111 * [ login] ( /docs/auth/login.md )
1212 * [ logout] ( /docs/auth/logout.md )
13+ * [ context] ( /docs/context/overview.md )
14+ * [ set] ( /docs/context/set.md )
15+ * [ clear] ( /docs/context/clear.md )
16+ * [ info] ( /docs/context/info.md )
1317* [ api] ( /docs/api.md )
1418* [ itwin] ( /docs/itwin/overview.md )
1519 * [ create] ( /docs/itwin/create.md )
Original file line number Diff line number Diff line change 1+ # itp context clear
2+
3+ Clear the cached context.
4+
5+ ## Examples
6+
7+ ``` bash
8+ # Example 1: Clear the cached context
9+ itp context clear
10+ ```
Original file line number Diff line number Diff line change 1+ # itp context info
2+
3+ Display the cached context.
4+
5+ ## Examples
6+
7+ ``` bash
8+ # Example 1: Display the cached context
9+ itp context info
10+ ```
Original file line number Diff line number Diff line change 1+ # itp context
2+
3+ Work with iTwin CLI context.
4+
5+ ## Available Commands
6+
7+ - [ itp context set] ( set.md )
8+ - [ itp context info] ( info.md )
9+ - [ itp context clear] ( clear.md )
Original file line number Diff line number Diff line change 1+ # itp context set
2+
3+ Set a new cached context.
4+
5+ ## Options
6+
7+ - ** ` --imodel-id ` **
8+ The ID of the iModel to create a context for.
9+ ** Type:** ` string ` ** Required:** No
10+
11+ - ** ` --itwin-id ` **
12+ The ID of the iTwin to create a context for.
13+ ** Type:** ` string ` ** Required:** No
14+
15+ ## Examples
16+
17+ ``` bash
18+ # Example 1: Set a new cached context using an iTwin ID
19+ itp context set --itwin-id 12345
20+
21+ # Example 2: Set a new cached context using an iModel ID
22+ itp context set --imodel-id 67890
23+
24+ # Example 3: Error when neither --itwin-id nor --imodel-id is provided
25+ itp context set
26+ ```
Original file line number Diff line number Diff line change 11import BaseCommand from "../../extensions/base-command.js" ;
22
33export default class ClearContext extends BaseCommand {
4- static description = "Clear the context of the current session ." ;
5-
4+ static description = "Clear the cached context ." ;
5+
66 static examples = [
77 {
88 command : `<%= config.bin %> <%= command.id %>` ,
9- description : 'Example 1: Clear the context of the current session '
9+ description : 'Example 1: Clear the cached context '
1010 }
1111 ] ;
1212
1313 async run ( ) {
1414 this . clearContext ( ) ;
1515 return this . logAndReturnResult ( { result : "Context cleared." } ) ;
1616 }
17- }
17+ }
Original file line number Diff line number Diff line change 11import BaseCommand from "../../extensions/base-command.js" ;
22
33export default class InfoContext extends BaseCommand {
4- static description = "Display the current context of the session ." ;
4+ static description = "Display the cached context." ;
55
66 static examples = [
77 {
88 command : `<%= config.bin %> <%= command.id %>` ,
9- description : 'Example 1: Display the current context of the session '
9+ description : 'Example 1: Display the cached context'
1010 }
1111 ] ;
1212
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import { Flags } from "@oclif/core";
55import BaseCommand from "../../extensions/base-command.js" ;
66
77export default class SetContext extends BaseCommand {
8- static description = "Create a new context for the current session ." ;
8+ static description = "Set a new cached context ." ;
99
1010 static examples = [
1111 {
1212 command : `<%= config.bin %> <%= command.id %>` ,
13- description : 'Example 1: Create a new context for the current session '
13+ description : 'Example 1: Set a new cached context '
1414 }
1515 ] ;
1616
You can’t perform that action at this time.
0 commit comments