Skip to content

feat: add lists create command#2

Open
12ian34 wants to merge 3 commits into
80x-djh:mainfrom
12ian34:feat/lists-create
Open

feat: add lists create command#2
12ian34 wants to merge 3 commits into
80x-djh:mainfrom
12ian34:feat/lists-create

Conversation

@12ian34

@12ian34 12ian34 commented Feb 19, 2026

Copy link
Copy Markdown

Summary

  • Adds attio lists create subcommand that calls POST /v2/lists to create new lists
  • Supports --name, --parent-object (required), plus optional --api-slug, --workspace-access, and repeatable --member-access flags
  • Auto-generates api_slug from the name in snake_case when not explicitly provided
  • Fixes entries create fails when list has no writable attributes #3: allows entries create and entries assert to proceed with empty entry_values when the list has no custom writable attributes

Usage

# Minimal: create a list for companies
attio lists create --name "Enterprise Sales" --parent-object companies

# With custom slug and access level
attio lists create --name "Enterprise Sales" --parent-object companies \
  --api-slug my_sales_list --workspace-access read-and-write

# With per-member access
attio lists create --name "Private Pipeline" --parent-object companies \
  --member-access "50cf242c-7fa3-4cad-87d0-75b1af71c57b:full-access"

# Quiet mode for scripting
LIST_ID=$(attio lists create --name "New Pipeline" --parent-object deals -q)

# Add a record to a list with no custom attributes (previously failed)
attio entries create my_list --record <record-id> --object companies

Test plan

  • 4 new unit tests for lists create in tests/lists.test.ts
  • 3 new unit tests for entries empty values fix in tests/entries-empty-values.test.ts
  • All 32 tests pass (npm test)
  • Build succeeds (npm run build)
  • Manual test against live Attio workspace

Adds the `attio lists create` subcommand which calls POST /v2/lists.

Options:
  --name (required)         Human-readable list name
  --parent-object (required) Object slug/ID for records in the list
  --api-slug                Override auto-generated snake_case slug
  --workspace-access        Access level for all members (default: full-access)
  --member-access           Grant per-member access (repeatable, member-id:level)

Includes 4 new tests covering the request body, custom slug, member access
parsing, and the existing list command.

Co-authored-by: Cursor <cursoragent@cursor.com>
12ian34 and others added 2 commits February 19, 2026 13:48
Fixes 80x-djh#3. Lists with only system attributes (no custom writable
attributes) caused `entries create` and `entries assert` to fail with
"No values provided" before any API call was made.

The root cause was `requireValues()` rejecting an empty values object.
For entries, `--record` and `--object` are the only truly required
inputs — the API accepts `entry_values: {}`. Removed the
`requireValues` gate from `entries create` and `entries assert` while
keeping it for `entries update` where values are always needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@12ian34 12ian34 marked this pull request as ready for review February 19, 2026 13:54
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.

entries create fails when list has no writable attributes

1 participant