When Bill de Blasio was running for mayor, he promised to let the public weigh in on his picks for New York City’s schools chief before appointing them.

“We need a chancellor who is presented to the public, not just forced down our throat,” he said on the campaign trail in 2012.

But he changed his tune after being elected, and has decided to keep the chancellor search private. On Tuesday, parents and advocates will hold a rally to demand that de Blasio give them a say in his current search to replace retiring schools Chancellor Carmen Fariña.

If the mayor did open the search to the public, what might it look like?

One option is what seems to be occurring by default: names thrown about largely in the dark, handicapped based on race, gender, and reputation. This messy debate creates more heat than light and advantages those with inside information over ordinary citizens. Hardly the public process advocates have in mind.

But there are other ways. Public superintendent searches are routine for most school districts run by elected school boards. While state law gives New York City’s mayor the authority to single-handedly appoint the chancellor, de Blasio could voluntarily borrow from districts with more open processes.

In those districts, community consensus is usually reached on a job description with desired qualifications. The post is widely advertised, often by a specialized superintendent search firm that conducts an initial review of confidential applications. A list of qualified candidates is presented to the Board of Education, which further culls the still-private list to arrive at three to five finalists.

After the candidates are given a chance to inform their current employers, they are publicly announced and interviews scheduled. In the ensuing weeks, the public and press explore finalists’ records. Members of the screening committee may even visit their home districts. Candidate interviews are often televised or streamed online. The position is then offered after a period of post-interview public comment and board deliberation.

The process can be bumpy, but it gets done. Public confidence is established through participation and a full vetting of the candidates. And because the process is common in most places, the finalists expect this type of scrutiny — they can even use it as an opportunity to renegotiate their contracts by threatening to leave for greener pastures.

So how could de Blasio adapt some of those practices for New York?

One idea is to appoint an independent panel that could submit a list of finalists for the mayor to choose from. The panel could consist of students, parents, educators, and community members, or perhaps each of the five borough presidents.

Another idea is to let the city council weigh in on the candidates. The mayor could nominate his pick for chancellor, who would then face the council’s education committee for questioning before the full council votes on the appointment — just as happens with the president’s cabinet nominations.

It is not too late to institute any of these proposals for a public search.

A thoughtful, transparent process would be a win-win for the mayor, enhancing his progressive credentials while allowing him to remain in the driver’s seat. A public search would also be a win for the city and the next chancellor, who would arrive with more of a popular mandate than if she or he was vetted and hired behind closed doors.

We only have to look back a few years, to the lamentable appointment of Cathie Black, to understand how a unilateral appointment can quickly go off the rails. A public process makes sense, and the moment is now.

David C. Bloomfield is professor of education leadership, law, and policy at Brooklyn College and The CUNY Graduate Center.