c8y(1)

πŸ“¦ version 2.56.1, in nixpkgs unstable

πŸ’… c8y(1) β€” the c8y girlies' field guide πŸŽ€

okay so bestie, this is c8y(1), like the whole command line tool β€” and this page right here? it's all about the assert text glow-up ✨ c8y-assert-text is the name on the birth certificate, and its whole job is literally just Assert text. that's it, that's the vibe. πŸ’–


✨ NAME ✨

c8y-assert-text β€” assert text, bestie. no cap, that's what it does. πŸ¦‹


🌸 SYNOPSIS 🌸

c8y assert text [flags]

πŸ’œ DESCRIPTION πŸ’œ

it asserts text input. like, you give it text, it checks the text, and it tells you if your text is giving what it's supposed to give. simple. iconic. periodt. πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • --exact="" β€” match the text exactly, character for character. it's case sensitive, so don't come at it with your lowercase when it asked for uppercase, ok? πŸ’…
  • -h, --help[=false] β€” help for text. your little emotional support flag when you're lost. 🫢
  • --input="" β€” the input value to be repeated. this one is required (!!), and yes it accepts pipeline, so you can pipe stuff straight in. πŸ“
  • --regex="" β€” match against a regular expression. also case sensitive, regex girlies stay winning. ⭐
  • --schema="" β€” match against a json schema. for the structured-data girlies who need ✨validation✨.
  • --strict[=false] β€” strict mode. fail if no match is found. it's giving "no match? we're not doing that here." πŸ’€

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

these are the family flags β€” inherited, but still main character energy fr fr.

  • --abortOnErrors=10 β€” abort the batch when you hit the specified number of errors. default is 10, so you get ten strikes before it's over. 😭
  • --allowEmptyPipe[=false] β€” don't fail when the piped input (stdin) is empty. like, let the girl breathe. 🧚
  • --cache[=false] β€” enable cached responses. speed. ⚑
  • --cacheBodyPaths=[] β€” cache should limit hashing of selected paths in the json body. an empty value indicates all values. πŸ’–
  • --cacheTTL="60s" β€” cache time-to-live (TTL) as a duration, i.e. 60s, 2m. default 60s. 🌸
  • -c, --compact[=false] β€” compact instead of pretty-printed output when using json output. lowkey important: pretty print is the default if output is the terminal. ✨
  • --confirm[=false] β€” prompt for confirmation. consent is key, bestie. 🫢
  • --confirmText="" β€” custom confirmation text. make it say whatever you want. πŸŽ€
  • --currentPage=0 β€” current page which should be returned. πŸ“„
  • --customQueryParam=[] β€” add custom URL query parameters, i.e. --customQueryParam 'withCustomOption=true,myOtherOption=myvalue'. πŸ”—
  • --debug[=false] β€” set very verbose log messages. strap in, she's gonna talk. πŸ’€
  • --delay="0ms" β€” delay after each request, i.e. 5ms, 1.2s. default 0ms. ⏳
  • --delayBefore="0ms" β€” delay before each request, i.e. 5ms, 1.2s. default 0ms. ⏳
  • --dry[=false] β€” dry run. don't send any data to the server. dress rehearsal only, no actual performance. πŸ’…
  • --dryFormat="markdown" β€” dry run output format, i.e. json, dump, markdown or curl. default markdown. πŸ“
  • --examples[=false] β€” show examples for the current command. yes bestie, there are examples, scroll down babe. πŸ‘€
  • --filter=[] β€” apply a client side filter to the response before returning it to the user. sift that tea. 🍡
  • --flatten[=false] β€” flatten json output by replacing nested json properties with properties where their names are represented by dot notation. nested? not anymore. πŸ¦‹
  • -f, --force[=false] β€” do not prompt for confirmation. ignored when using --confirm. ⚠️
  • -H, --header=[] β€” custom headers, i.e. --header "Accept: value, AnotherHeader: myvalue". 🌈
  • --includeAll[=false] β€” include all results by iterating through each page. all of it. every crumb. πŸͺ
  • -k, --insecure[=false] β€” allow insecure server connections when using SSL. ⚠️ yes she said it, she's being insecure on purpose, use with care bestie.
  • -l, --logMessage="" β€” add custom message to the activity log. leave a lil note for the group chat. πŸ’Œ
  • --maxJobs=0 β€” maximum number of jobs. 0 = unlimited (use with caution!). 🚨
  • --noAccept[=false] β€” ignore Accept header will remove the Accept header from requests, however PUT and POST requests will only see the effect. πŸ€”
  • --noCache[=false] β€” force disabling of cached responses (overwrites cache setting). πŸ’₯
  • -M, --noColor[=false] β€” don't use colors when displaying log entries on the console. monochrome moment. πŸ–€
  • --noLog[=false] β€” disables the activity log for the current command. 🀫
  • --noProgress[=false] β€” disable progress bars. no lil bars, just vibes. 🚫
  • --noProxy[=false] β€” ignore the proxy settings. πŸ™ˆ
  • -n, --nullInput[=false] β€” don't read the input (stdin). useful if using in shell for/while loops. πŸ”
  • -o, --output="table" β€” output format, i.e. table, json, csv, csvheader. default table. πŸ“Š
  • --outputFile="" β€” save JSON output to file (after select/view). πŸ’Ύ
  • --outputFileRaw="" β€” save raw response to file (before select/view). πŸ’Ύ
  • --outputTemplate="" β€” jsonnet template to apply to the output. fancy. ✨
  • -p, --pageSize=5 β€” maximum results per page. default 5. πŸ“–
  • --progress[=false] β€” show progress bar. heads up though: this will also disable any other verbose output. ⚠️
  • --proxy="" β€” proxy setting, i.e. http://10.0.0.1:8080. 🌐
  • -r, --raw[=false] β€” show raw response. this mode will force output=json and view=off. no filter, no fuss. πŸͺž
  • --retries=3 β€” max number of attempts when a failed http call is encountered. default 3. she tries, ok? she tries. 😀
  • --select=[] β€” comma separated list of properties to return. wildcards and globstar accepted, i.e. --select 'id,name,type,**.serialNumber'. 🎯
  • --session="" β€” session configuration. πŸ”
  • --sessionMode="" β€” override default session mode for a single command which would normally be disabled. 😼
  • -P, --sessionPassword="" β€” override session password. 🀐
  • -U, --sessionUsername="" β€” override session username, i.e. peter or t1234/peter (with tenant). πŸ§‘β€πŸ’»
  • --silentExit[=false] β€” silent status codes do not affect the exit code. πŸ”‡
  • --silentStatusCodes="" β€” status codes which will not print out an error message. 🀐
  • --timeout="600s" β€” request timeout duration, i.e. 60s, 2m. default 600s. ⏰
  • --totalPages=0 β€” total number of pages to get. πŸ“š
  • -v, --verbose[=false] β€” verbose logging. she's telling you everything. πŸ—£οΈ
  • --view="auto" β€” use views when displaying data on the terminal. disable using --view off. πŸ–ΌοΈ
  • --withError[=false] β€” errors will be printed on stdout instead of stderr. πŸ”€
  • --withTotalElements[=false] β€” request Cumulocity to include the total elements in the response statistics under .statistics.totalElements (introduced in 10.13). πŸ”’
  • -t, --withTotalPages[=false] β€” request Cumulocity to include the total pages in the response statistics under .statistics.totalPages. πŸ“‘
  • --workers=1 β€” number of workers. default 1. πŸ‘―

🌈 EXAMPLE 🌈

assert that the input matches a given schema 🧚

$ echo "{\"name\": \"device01\"}" | c8y assert text --schema "myschema.json"

assert that the input text matches a given string exactly (case sensitive) πŸ’…

$ echo "myname" | c8y assert text --exact "myname"

assert that the input text matches a given regular expression (case sensitive) πŸ”₯

$ echo "myname" | c8y assert text --regex '.*name$'

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’– reminder bestie: --exact and --regex are case sensitive, --force gets ignored when you use --confirm, and --maxJobs=0 means unlimited β€” use with caution, ok?? i'm not gonna say it twice. 😭

k bye ily, this page is from Jan 1980 and it says c8y(1) at the bottom so you know it's the real one β€” see you in the next manpage, mwah πŸŽ€πŸ’œπŸ«Ά

πŸ“¦ where this page comes from