Skip to content

Releases: mmkal/trpc-cli

v0.10.0

10 Jul 15:24

Choose a tag to compare


v0.9.2...v0.10.0

v0.9.2

12 Jun 00:52

Choose a tag to compare

v0.9.1

12 Jun 00:42

Choose a tag to compare

  • fix: avoid confusing bundlers 56d0d0f
  • ci: run on pull request b25f63a

v0.9.0...v0.9.1

v0.9.0

11 Jun 17:51

Choose a tag to compare

You can now also pass an oRPC router (thanks @unnoq)! Much like tRPC, just pass a router:

import {os} from '@orpc/server'
import {z, createCli} from 'trpc-cli'

export const router = os.router({
  add: os.procedure
    .input(z.object({left: z.number(), right: z.number()}))
    .handler(({input}) => input.left + input.right),
})

const cli = createCli({router})
cli.run()

Commits in this release:


v0.8.0...v0.9.0

v0.8.0

10 Jun 19:49

Choose a tag to compare


v0.7.1...v0.8.0

v0.7.1

10 Jun 15:10

Choose a tag to compare


v0.7.0...v0.7.1

v0.7.0

20 May 20:02

Choose a tag to compare

What's Changed

  • standard-schema error prettifier by @mmkal in #87
  • use zod/v4 by @mmkal in #85 - note that zod/v4 already worked, but now we can take advantage of .meta(...) and get nicer messages when users pass invalid commands (nicer messages for valibot, arktype and effect too!)
  • sync tests for all validation libraries, bump arktype and valibot by @mmkal in #80

Full Changelog: v0.6.0...v0.7.0

v0.6.0

14 May 03:00

Choose a tag to compare

0.5.x -> 0.6.0 is a big release - while the basic createCli({router}).run() usage is unchanged, a lot was rewritten and the actual CLI program created is different both superficially and under the hood.

There are changes and fixes still to come but the core functionality is working better than 0.5.x - just be aware that some like input prompts and trpc-cli binscript usage have some improvements still to come.

New features:

  1. valibot, arktype, effect and zod v4 can now all be used to define inputs (note: valibot requires installing an additional (official valibot) library)
  2. automatic input prompting via enquirer, @inquirer/prompts or prompts
  3. shell completion generation via omelette

Significant refactors (affects you if you were messing around with internals):

  1. Input parsers are now converted to json-schema as a common language, so they can be mapped to CLI arguments/options

Arguably breaking changes (affect user behaviour):

  1. commander is now used instead of cleye under the hood (so helptext formatting etc. is marginally different)
  2. the above enables proper subcommand support. So nested rooters are called like mycli search by-name instead of mycli search.byName. Also mycli search will list all of its subcommands (search router's procedures) along with helptext, etc.
  3. commands and option names are still kebab-cased but no longer aliased to camel-case (alias was a built-in feature of cleye, but doesn't seem worth mimicking since this is still on 0.x.x)

Other breaking changes (could affect some developers)

  1. built-in trpc version is v11. v10 support still exists but the module must be passed in. v10 support might be removed fairly soon
  2. FailedToExitError thrown when you pass an exit function that exits successfully - this actually makes it easier to run as a promise and get the return value, but requires try/catch
  3. aliases are defined on the procedure's meta, not globally. Though this might change again with zod 4's meta method

What's Changed

Full Changelog: v0.5.1...v0.6.0

v0.6.0-15

05 May 19:16

Choose a tag to compare

v0.6.0-15 Pre-release
Pre-release

v0.6.0-14...v0.6.0-15

v0.6.0-14

02 May 20:05

Choose a tag to compare

v0.6.0-14 Pre-release
Pre-release