Oxen-AI / Oxen

Oxen.ai's core rust library, server, and CLI
https://oxen.ai
Apache License 2.0
180 stars 11 forks source link

Json output for sub-commands #145

Open paul-hammant opened 1 year ago

paul-hammant commented 1 year ago

Building on https://github.com/Oxen-AI/Oxen/issues/138, it would be great if oxen info --json <pathname> were possible.

That would spit out the likes of:

{
   resource: path/to/resource
   branchName: branch_name
   version: 4
   siphash1p3: {
     resourceContents: ab689b0336d7a4738d2892aeb90fa16d
     revision: fab689b0336d7a4738d2892aeb90fa16
   }
  classification: {
    type: text  
    mimeType: text/plain    
    suffix: txt
  } 
  meta: {
     epoch: 1687856220
     sizeBytes: 1234
  }
}

I think it's Rust's underlying choice of siphash 1.3 that's being used for hashing, but I could be wrong.

--json would be an option of course.

gschoeni commented 1 year ago

Added this flag in a PR, still need to document but it will be in the next release.

I’m curious about your use case if you don’t mind me asking! Great suggestions so far

paul-hammant commented 1 year ago

Context

I'm a fan of source control and new technologies roughly in that space. Nearly ten years back, Google's Rachel Potvin talked of their change from Perforce to Piper and having 86TB of history (monorepo & directed graph build tech Blaze), and 9 million source files. I've perf tested Subversion up to 4TB and would like to do so again for Oxen.

I'm also the person that maintains trunkbaseddevelopment.com. I dislike GitFlow and other non-trunk branching models. I'll claim that GitHub's pull request model and "GitHub Flow" is a form of TBD. Google doesn't do that - they effectively have patch queue software. Historically a Python/Postgres app called Mondrian that sat on a Postgres database. Replaced some years back with something that's like it, but closer to BigTable I guess.

Goals

I have a list of features for VCS techs that I am eternally chasing - https://paulhammant.com/2020/01/19/vcs-nirvana. Every time a new VCS tech pops up, I'm in email or on calls to the creators to talk about my list, and see how close they can get.