layer 1.0.5__tar.gz → 1.0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {layer-1.0.5 → layer-1.0.7}/PKG-INFO +46 -7
  2. layer-1.0.7/README.md +108 -0
  3. {layer-1.0.5 → layer-1.0.7}/pyproject.toml +2 -2
  4. {layer-1.0.5 → layer-1.0.7}/pyproject.toml.orig +2 -2
  5. {layer-1.0.5 → layer-1.0.7}/src/layer/__init__.py +1 -1
  6. {layer-1.0.5 → layer-1.0.7}/src/layer/_api/models.py +42 -0
  7. layer-1.0.5/README.md +0 -69
  8. {layer-1.0.5 → layer-1.0.7}/src/layer/__main__.py +0 -0
  9. {layer-1.0.5 → layer-1.0.7}/src/layer/_api/__init__.py +0 -0
  10. {layer-1.0.5 → layer-1.0.7}/src/layer/_api/client.py +0 -0
  11. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/__init__.py +0 -0
  12. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/auth_commands.py +0 -0
  13. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/base_model_commands.py +0 -0
  14. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/context.py +0 -0
  15. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/context_commands.py +0 -0
  16. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/generate_commands.py +0 -0
  17. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/main.py +0 -0
  18. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/output.py +0 -0
  19. {layer-1.0.5 → layer-1.0.7}/src/layer/_cli/workspaces.py +0 -0
  20. {layer-1.0.5 → layer-1.0.7}/src/layer/auth.py +0 -0
  21. {layer-1.0.5 → layer-1.0.7}/src/layer/catalog.py +0 -0
  22. {layer-1.0.5 → layer-1.0.7}/src/layer/config.py +0 -0
  23. {layer-1.0.5 → layer-1.0.7}/src/layer/credentials.py +0 -0
  24. {layer-1.0.5 → layer-1.0.7}/src/layer/download.py +0 -0
  25. {layer-1.0.5 → layer-1.0.7}/src/layer/exit_codes.py +0 -0
  26. {layer-1.0.5 → layer-1.0.7}/src/layer/generate.py +0 -0
  27. {layer-1.0.5 → layer-1.0.7}/src/layer/oauth.py +0 -0
  28. {layer-1.0.5 → layer-1.0.7}/src/layer/params.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: layer
3
- Version: 1.0.5
3
+ Version: 1.0.7
4
4
  Summary: Command-line interface for Layer — AI asset generation for game studios.
5
5
  Keywords: layer,ai,generative,game-development,cli
6
6
  Author: Layer
@@ -20,7 +20,7 @@ Requires-Dist: tomli-w>=1.0.0,<2.0.0
20
20
  Requires-Dist: typer>=0.15.0,<1.0.0
21
21
  Requires-Python: >=3.10
22
22
  Project-URL: Homepage, https://layer.ai
23
- Project-URL: Documentation, https://www.layer.ai/docs/cli
23
+ Project-URL: Documentation, https://layer.ai/docs/cli
24
24
  Project-URL: Changelog, https://github.com/layerai/app/releases
25
25
  Description-Content-Type: text/markdown
26
26
 
@@ -28,15 +28,18 @@ Description-Content-Type: text/markdown
28
28
 
29
29
  Command-line interface for [Layer](https://layer.ai) — AI asset generation for game studios.
30
30
 
31
- > **Pre-release.** This is an early build of the rewritten CLI. Asset generation is
32
- > landing next; today it covers signing in and choosing a workspace.
31
+ Reaches the same models, workspaces, and Creative Unit balance as the app, from a
32
+ terminal, a Makefile, or a CI job.
33
33
 
34
34
  ## Install
35
35
 
36
36
  ```sh
37
- uv tool install --prerelease=allow layer # or: pipx install --pip-args=--pre layer
37
+ uv tool install layer # or: pipx install layer
38
38
  ```
39
39
 
40
+ Python 3.10 and up — deliberately older than the services that build it, so the same
41
+ package imports inside Blender, Maya, and Houdini.
42
+
40
43
  Working on the CLI itself? Install it from your checkout instead, so the `layer`
41
44
  command follows the branch you have out:
42
45
 
@@ -56,6 +59,36 @@ layer use my-studio
56
59
  For CI and other unattended runs, set `LAYER_API_KEY` to a personal access token instead
57
60
  of signing in.
58
61
 
62
+ ## Generate
63
+
64
+ ```sh
65
+ layer generate image -p "a crystal sword icon, transparent background"
66
+ layer generate video -d 5 --aspect-ratio 16:9 -p "camera pushes through the gate"
67
+ layer generate mesh -p "weathered treasure chest, game-ready"
68
+ layer generate audio -p "arcade coin pickup"
69
+ ```
70
+
71
+ Each waits for the run, prints what it cost, and writes the result into the working
72
+ directory under a name derived from the prompt — never overwriting a file already there.
73
+ `-o` takes a directory, or the exact filename when there is a single output;
74
+ `--no-download` prints URLs instead.
75
+
76
+ Leave `--base-model` off and the recommended model for that modality is chosen and
77
+ named. The catalogue is read from your workspace, not shipped with the package:
78
+
79
+ ```sh
80
+ layer base-models list --modality video
81
+ layer base-models show bfl-flux-2-pro # the keys --param accepts
82
+ ```
83
+
84
+ Every run is priced before it executes. `--confirm` asks first; `--max-cost 8` refuses
85
+ anything more expensive. For a long render, submit and collect later:
86
+
87
+ ```sh
88
+ id=$(layer --json generate video --no-wait -p "..." | jq -r .inference_id)
89
+ layer generate status "$id" --wait
90
+ ```
91
+
59
92
  ## Where settings come from
60
93
 
61
94
  Highest wins:
@@ -81,14 +114,20 @@ go to stderr, so a pipeline never has to filter them out.
81
114
 
82
115
  ```sh
83
116
  layer --json whoami | jq -r .workspace
117
+ layer --json generate image -p "..." | jq -r '.files[].path'
84
118
  ```
85
119
 
86
120
  Exit codes: `0` ok, `1` error, `2` usage, `3` auth, `4` insufficient balance,
87
- `5` invalid input, `6` content policy, `7` timeout.
121
+ `5` invalid input, `6` content policy, `7` timeout. They may gain members, never change
122
+ meaning, so a caller can branch on them without parsing prose.
88
123
 
89
124
  ## Documentation
90
125
 
91
- <https://www.layer.ai/docs/cli>
126
+ <https://layer.ai/docs/cli>
127
+
128
+ Driving Layer from an agent rather than a shell? There is an
129
+ [MCP server](https://layer.ai/mcp) and an
130
+ [Agent Skills pack](https://layer.ai/skills).
92
131
 
93
132
  ## Licence
94
133
 
layer-1.0.7/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # layer
2
+
3
+ Command-line interface for [Layer](https://layer.ai) — AI asset generation for game studios.
4
+
5
+ Reaches the same models, workspaces, and Creative Unit balance as the app, from a
6
+ terminal, a Makefile, or a CI job.
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ uv tool install layer # or: pipx install layer
12
+ ```
13
+
14
+ Python 3.10 and up — deliberately older than the services that build it, so the same
15
+ package imports inside Blender, Maya, and Houdini.
16
+
17
+ Working on the CLI itself? Install it from your checkout instead, so the `layer`
18
+ command follows the branch you have out:
19
+
20
+ ```sh
21
+ task -d apps/cli-py install-cli
22
+ ```
23
+
24
+ ## Sign in
25
+
26
+ ```sh
27
+ layer login # opens a browser
28
+ layer login --device # for SSH sessions and containers
29
+ layer whoami
30
+ layer use my-studio
31
+ ```
32
+
33
+ For CI and other unattended runs, set `LAYER_API_KEY` to a personal access token instead
34
+ of signing in.
35
+
36
+ ## Generate
37
+
38
+ ```sh
39
+ layer generate image -p "a crystal sword icon, transparent background"
40
+ layer generate video -d 5 --aspect-ratio 16:9 -p "camera pushes through the gate"
41
+ layer generate mesh -p "weathered treasure chest, game-ready"
42
+ layer generate audio -p "arcade coin pickup"
43
+ ```
44
+
45
+ Each waits for the run, prints what it cost, and writes the result into the working
46
+ directory under a name derived from the prompt — never overwriting a file already there.
47
+ `-o` takes a directory, or the exact filename when there is a single output;
48
+ `--no-download` prints URLs instead.
49
+
50
+ Leave `--base-model` off and the recommended model for that modality is chosen and
51
+ named. The catalogue is read from your workspace, not shipped with the package:
52
+
53
+ ```sh
54
+ layer base-models list --modality video
55
+ layer base-models show bfl-flux-2-pro # the keys --param accepts
56
+ ```
57
+
58
+ Every run is priced before it executes. `--confirm` asks first; `--max-cost 8` refuses
59
+ anything more expensive. For a long render, submit and collect later:
60
+
61
+ ```sh
62
+ id=$(layer --json generate video --no-wait -p "..." | jq -r .inference_id)
63
+ layer generate status "$id" --wait
64
+ ```
65
+
66
+ ## Where settings come from
67
+
68
+ Highest wins:
69
+
70
+ 1. a command-line flag
71
+ 2. an environment variable — `LAYER_PROFILE`, `LAYER_WORKSPACE`, `LAYER_PROJECT`,
72
+ `LAYER_API_URL`, `LAYER_API_KEY`
73
+ 3. `layer.toml`, found by walking up from the working directory
74
+ 4. the active profile in `~/.layer/config.toml`
75
+
76
+ Committing a `layer.toml` pins a checkout to its workspace, so two repos open in two
77
+ terminals cannot generate into each other's:
78
+
79
+ ```toml
80
+ workspace = "my-studio"
81
+ project = "season-12-art"
82
+ ```
83
+
84
+ ## Scripting
85
+
86
+ `--json` puts the result on stdout and nothing else — progress, warnings, and errors all
87
+ go to stderr, so a pipeline never has to filter them out.
88
+
89
+ ```sh
90
+ layer --json whoami | jq -r .workspace
91
+ layer --json generate image -p "..." | jq -r '.files[].path'
92
+ ```
93
+
94
+ Exit codes: `0` ok, `1` error, `2` usage, `3` auth, `4` insufficient balance,
95
+ `5` invalid input, `6` content policy, `7` timeout. They may gain members, never change
96
+ meaning, so a caller can branch on them without parsing prose.
97
+
98
+ ## Documentation
99
+
100
+ <https://layer.ai/docs/cli>
101
+
102
+ Driving Layer from an agent rather than a shell? There is an
103
+ [MCP server](https://layer.ai/mcp) and an
104
+ [Agent Skills pack](https://layer.ai/skills).
105
+
106
+ ## Licence
107
+
108
+ Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "layer"
3
- version = "1.0.5"
3
+ version = "1.0.7"
4
4
  description = "Command-line interface for Layer — AI asset generation for game studios."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -35,7 +35,7 @@ email = "info@layer.ai"
35
35
 
36
36
  [project.urls]
37
37
  Homepage = "https://layer.ai"
38
- Documentation = "https://www.layer.ai/docs/cli"
38
+ Documentation = "https://layer.ai/docs/cli"
39
39
  Changelog = "https://github.com/layerai/app/releases"
40
40
 
41
41
  [project.scripts]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "layer"
3
- version = "1.0.5"
3
+ version = "1.0.7"
4
4
  description = "Command-line interface for Layer — AI asset generation for game studios."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Layer", email = "info@layer.ai" }]
@@ -29,7 +29,7 @@ dependencies = [
29
29
 
30
30
  [project.urls]
31
31
  Homepage = "https://layer.ai"
32
- Documentation = "https://www.layer.ai/docs/cli"
32
+ Documentation = "https://layer.ai/docs/cli"
33
33
  Changelog = "https://github.com/layerai/app/releases"
34
34
 
35
35
  [project.scripts]
@@ -1,7 +1,7 @@
1
1
  """Layer's command-line interface, and the client it is built on.
2
2
 
3
3
  The CLI is the product; this package is what it runs. The public surface here is small on
4
- purpose and grows as commands land — see https://www.layer.ai/docs/cli.
4
+ purpose and grows as commands land — see https://layer.ai/docs/cli.
5
5
  """
6
6
 
7
7
  from importlib.metadata import version
@@ -29,6 +29,22 @@ class AddProjectMembersBody(BaseModel):
29
29
  )
30
30
 
31
31
 
32
+ class AudioOutputFormat(Enum):
33
+ """
34
+ Container for a delivered audio file.
35
+
36
+ Providers name these their own way and Layer never re-encodes what one returns, so the
37
+ format a caller asks for is only keepable on models whose capabilities list it. Members are
38
+ named for their wire value: the frontend artifacts preserve enum *names*, and a name that
39
+ differed from the value would hand clients a format string the request API rejects.
40
+ """
41
+
42
+ mp3 = "mp3"
43
+ wav = "wav"
44
+ aac = "aac"
45
+ flac = "flac"
46
+
47
+
32
48
  class BlueprintRunStatus(Enum):
33
49
  """
34
50
  Enum representing the status of a blueprint run.
@@ -1522,6 +1538,16 @@ class BaseModelCapabilitiesREST(BaseModel):
1522
1538
  )
1523
1539
  audio_inpaint: bool | None = Field(False, title="Audio Inpaint")
1524
1540
  audio_outpaint: bool | None = Field(False, title="Audio Outpaint")
1541
+ audio_segments: bool | None = Field(
1542
+ False,
1543
+ description="Scores a video stretch by stretch from a contiguous list of per-stretch briefs.",
1544
+ title="Audio Segments",
1545
+ )
1546
+ output_formats: list[str] | None = Field(
1547
+ None,
1548
+ description="Containers this model can be asked to deliver. Layer never re-encodes a clip, so an empty list means the model returns what it returns and the format cannot be promised.",
1549
+ title="Output Formats",
1550
+ )
1525
1551
  voice_reference_set_required: bool | None = Field(
1526
1552
  False,
1527
1553
  description="Speaks only in a trained voice, so a generation needs a reference set holding one. Without it the provider falls back to its own default voice.",
@@ -2221,6 +2247,10 @@ class EstimateInferencePriceRequest(BaseModel):
2221
2247
  description="Compose the clip to repeat with no audible seam, on models whose capabilities report loop.",
2222
2248
  title="Loop",
2223
2249
  )
2250
+ output_format: AudioOutputFormat | None = Field(
2251
+ None,
2252
+ description="Container for the delivered file, one of the values the model's capabilities list under output_formats. Layer never re-encodes a clip, so a model that lists none delivers what it delivers.",
2253
+ )
2224
2254
  lyrics: str | None = Field(
2225
2255
  None,
2226
2256
  description="Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself.",
@@ -2344,6 +2374,10 @@ class EstimateInferencePriceV2Request(BaseModel):
2344
2374
  description="Compose the clip to repeat with no audible seam, on models whose capabilities report loop.",
2345
2375
  title="Loop",
2346
2376
  )
2377
+ output_format: AudioOutputFormat | None = Field(
2378
+ None,
2379
+ description="Container for the delivered file, one of the values the model's capabilities list under output_formats. Layer never re-encodes a clip, so a model that lists none delivers what it delivers.",
2380
+ )
2347
2381
  lyrics: str | None = Field(
2348
2382
  None,
2349
2383
  description="Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself.",
@@ -2461,6 +2495,10 @@ class ExecuteInferenceRequest(BaseModel):
2461
2495
  description="Compose the clip to repeat with no audible seam, on models whose capabilities report loop.",
2462
2496
  title="Loop",
2463
2497
  )
2498
+ output_format: AudioOutputFormat | None = Field(
2499
+ None,
2500
+ description="Container for the delivered file, one of the values the model's capabilities list under output_formats. Layer never re-encodes a clip, so a model that lists none delivers what it delivers.",
2501
+ )
2464
2502
  lyrics: str | None = Field(
2465
2503
  None,
2466
2504
  description="Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself.",
@@ -2593,6 +2631,10 @@ class ExecuteInferenceV2Request(BaseModel):
2593
2631
  description="Compose the clip to repeat with no audible seam, on models whose capabilities report loop.",
2594
2632
  title="Loop",
2595
2633
  )
2634
+ output_format: AudioOutputFormat | None = Field(
2635
+ None,
2636
+ description="Container for the delivered file, one of the values the model's capabilities list under output_formats. Layer never re-encodes a clip, so a model that lists none delivers what it delivers.",
2637
+ )
2596
2638
  lyrics: str | None = Field(
2597
2639
  None,
2598
2640
  description="Words to be sung, for models whose capabilities report lyrics. A separate input from the prompt, which describes the music itself.",
layer-1.0.5/README.md DELETED
@@ -1,69 +0,0 @@
1
- # layer
2
-
3
- Command-line interface for [Layer](https://layer.ai) — AI asset generation for game studios.
4
-
5
- > **Pre-release.** This is an early build of the rewritten CLI. Asset generation is
6
- > landing next; today it covers signing in and choosing a workspace.
7
-
8
- ## Install
9
-
10
- ```sh
11
- uv tool install --prerelease=allow layer # or: pipx install --pip-args=--pre layer
12
- ```
13
-
14
- Working on the CLI itself? Install it from your checkout instead, so the `layer`
15
- command follows the branch you have out:
16
-
17
- ```sh
18
- task -d apps/cli-py install-cli
19
- ```
20
-
21
- ## Sign in
22
-
23
- ```sh
24
- layer login # opens a browser
25
- layer login --device # for SSH sessions and containers
26
- layer whoami
27
- layer use my-studio
28
- ```
29
-
30
- For CI and other unattended runs, set `LAYER_API_KEY` to a personal access token instead
31
- of signing in.
32
-
33
- ## Where settings come from
34
-
35
- Highest wins:
36
-
37
- 1. a command-line flag
38
- 2. an environment variable — `LAYER_PROFILE`, `LAYER_WORKSPACE`, `LAYER_PROJECT`,
39
- `LAYER_API_URL`, `LAYER_API_KEY`
40
- 3. `layer.toml`, found by walking up from the working directory
41
- 4. the active profile in `~/.layer/config.toml`
42
-
43
- Committing a `layer.toml` pins a checkout to its workspace, so two repos open in two
44
- terminals cannot generate into each other's:
45
-
46
- ```toml
47
- workspace = "my-studio"
48
- project = "season-12-art"
49
- ```
50
-
51
- ## Scripting
52
-
53
- `--json` puts the result on stdout and nothing else — progress, warnings, and errors all
54
- go to stderr, so a pipeline never has to filter them out.
55
-
56
- ```sh
57
- layer --json whoami | jq -r .workspace
58
- ```
59
-
60
- Exit codes: `0` ok, `1` error, `2` usage, `3` auth, `4` insufficient balance,
61
- `5` invalid input, `6` content policy, `7` timeout.
62
-
63
- ## Documentation
64
-
65
- <https://www.layer.ai/docs/cli>
66
-
67
- ## Licence
68
-
69
- Apache-2.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes